From e06ee02e034a5ce6978e9f098bd0326d0aba1683 Mon Sep 17 00:00:00 2001 From: Daniel Paoliello Date: Thu, 2 Jan 2025 14:19:12 -0800 Subject: [PATCH] Cleanup tests by using checked in baseline files --- .../Base/CXXMethodDeclarationTest.cs | 146 -- .../Base/CXXMethodDeclarationXmlTest.cs | 53 - .../Base/DeprecatedToObsoleteTest.cs | 64 - .../Base/EnumDeclarationTest.cs | 112 - .../Base/FunctionDeclarationBodyImportTest.cs | 288 --- .../Base/FunctionDeclarationDllImportTest.cs | 121 - .../Base/FunctionPointerDeclarationTest.cs | 24 - .../Base/StructDeclarationTest.cs | 293 --- .../Base/UnionDeclarationTest.cs | 245 -- .../Base/VarDeclarationTest.cs | 124 - .../Baselines/CTest.BasicTest.Unix.Latest.cs | 16 + .../CTest.BasicTest.Windows.Latest.cs | 15 + .../Baselines/CTest.EnumTest.Unix.Latest.cs | 19 + .../CTest.EnumTest.Windows.Latest.cs | 19 + .../Baselines/CTest.MacroTest.Unix.Latest.cs | 11 + .../CTest.MacroTest.Windows.Latest.cs | 11 + .../Baselines/CTest.StructTest.Unix.Latest.cs | 45 + .../CTest.StructTest.Windows.Latest.cs | 45 + .../Baselines/CTest.UnionTest.Unix.Latest.cs | 23 + .../CTest.UnionTest.Windows.Latest.cs | 23 + ...ionTest.ConstructorTest.Unix.Compatible.cs | 12 + ...onTest.ConstructorTest.Unix.Compatible.xml | 17 + ...rationTest.ConstructorTest.Unix.Default.cs | 12 + ...ationTest.ConstructorTest.Unix.Default.xml | 17 + ...arationTest.ConstructorTest.Unix.Latest.cs | 12 + ...rationTest.ConstructorTest.Unix.Latest.xml | 17 + ...rationTest.ConstructorTest.Unix.Preview.cs | 12 + ...ationTest.ConstructorTest.Unix.Preview.xml | 17 + ...Test.ConstructorTest.Windows.Compatible.cs | 12 + ...est.ConstructorTest.Windows.Compatible.xml | 17 + ...ionTest.ConstructorTest.Windows.Default.cs | 12 + ...onTest.ConstructorTest.Windows.Default.xml | 17 + ...tionTest.ConstructorTest.Windows.Latest.cs | 12 + ...ionTest.ConstructorTest.Windows.Latest.xml | 17 + ...ionTest.ConstructorTest.Windows.Preview.cs | 12 + ...onTest.ConstructorTest.Windows.Preview.xml | 17 + ...uctorWithInitializeTest.Unix.Compatible.cs | 28 + ...ctorWithInitializeTest.Unix.Compatible.xml | 61 + ...structorWithInitializeTest.Unix.Default.cs | 28 + ...tructorWithInitializeTest.Unix.Default.xml | 61 + ...nstructorWithInitializeTest.Unix.Latest.cs | 28 + ...structorWithInitializeTest.Unix.Latest.xml | 61 + ...structorWithInitializeTest.Unix.Preview.cs | 28 + ...tructorWithInitializeTest.Unix.Preview.xml | 61 + ...orWithInitializeTest.Windows.Compatible.cs | 28 + ...rWithInitializeTest.Windows.Compatible.xml | 61 + ...uctorWithInitializeTest.Windows.Default.cs | 28 + ...ctorWithInitializeTest.Windows.Default.xml | 61 + ...ructorWithInitializeTest.Windows.Latest.cs | 28 + ...uctorWithInitializeTest.Windows.Latest.xml | 61 + ...uctorWithInitializeTest.Windows.Preview.cs | 28 + ...ctorWithInitializeTest.Windows.Preview.xml | 61 + ...tionTest.ConversionTest.Unix.Compatible.cs | 12 + ...ionTest.ConversionTest.Unix.Compatible.xml | 14 + ...arationTest.ConversionTest.Unix.Default.cs | 12 + ...rationTest.ConversionTest.Unix.Default.xml | 14 + ...larationTest.ConversionTest.Unix.Latest.cs | 12 + ...arationTest.ConversionTest.Unix.Latest.xml | 14 + ...arationTest.ConversionTest.Unix.Preview.cs | 12 + ...rationTest.ConversionTest.Unix.Preview.xml | 14 + ...nTest.ConversionTest.Windows.Compatible.cs | 12 + ...Test.ConversionTest.Windows.Compatible.xml | 14 + ...tionTest.ConversionTest.Windows.Default.cs | 12 + ...ionTest.ConversionTest.Windows.Default.xml | 14 + ...ationTest.ConversionTest.Windows.Latest.cs | 12 + ...tionTest.ConversionTest.Windows.Latest.xml | 14 + ...tionTest.ConversionTest.Windows.Preview.cs | 12 + ...ionTest.ConversionTest.Windows.Preview.xml | 14 + ...heritedFromTemplateTest.Unix.Compatible.cs | 11 + ...eritedFromTemplateTest.Unix.Compatible.xml | 19 + ...rInheritedFromTemplateTest.Unix.Default.cs | 11 + ...InheritedFromTemplateTest.Unix.Default.xml | 19 + ...erInheritedFromTemplateTest.Unix.Latest.cs | 11 + ...rInheritedFromTemplateTest.Unix.Latest.xml | 19 + ...rInheritedFromTemplateTest.Unix.Preview.cs | 11 + ...InheritedFromTemplateTest.Unix.Preview.xml | 19 + ...itedFromTemplateTest.Windows.Compatible.cs | 11 + ...tedFromTemplateTest.Windows.Compatible.xml | 19 + ...heritedFromTemplateTest.Windows.Default.cs | 11 + ...eritedFromTemplateTest.Windows.Default.xml | 19 + ...nheritedFromTemplateTest.Windows.Latest.cs | 11 + ...heritedFromTemplateTest.Windows.Latest.xml | 19 + ...heritedFromTemplateTest.Windows.Preview.cs | 11 + ...eritedFromTemplateTest.Windows.Preview.xml | 19 + ...tionTest.DestructorTest.Unix.Compatible.cs | 9 + ...ionTest.DestructorTest.Unix.Compatible.xml | 11 + ...arationTest.DestructorTest.Unix.Default.cs | 9 + ...rationTest.DestructorTest.Unix.Default.xml | 11 + ...larationTest.DestructorTest.Unix.Latest.cs | 9 + ...arationTest.DestructorTest.Unix.Latest.xml | 11 + ...arationTest.DestructorTest.Unix.Preview.cs | 9 + ...rationTest.DestructorTest.Unix.Preview.xml | 11 + ...nTest.DestructorTest.Windows.Compatible.cs | 9 + ...Test.DestructorTest.Windows.Compatible.xml | 11 + ...tionTest.DestructorTest.Windows.Default.cs | 9 + ...ionTest.DestructorTest.Windows.Default.xml | 11 + ...ationTest.DestructorTest.Windows.Latest.cs | 9 + ...tionTest.DestructorTest.Windows.Latest.xml | 11 + ...tionTest.DestructorTest.Windows.Preview.cs | 9 + ...ionTest.DestructorTest.Windows.Preview.xml | 11 + ...rationTest.InstanceTest.Unix.Compatible.cs | 20 + ...ationTest.InstanceTest.Unix.Compatible.xml | 21 + ...clarationTest.InstanceTest.Unix.Default.cs | 20 + ...larationTest.InstanceTest.Unix.Default.xml | 21 + ...eclarationTest.InstanceTest.Unix.Latest.cs | 20 + ...clarationTest.InstanceTest.Unix.Latest.xml | 21 + ...clarationTest.InstanceTest.Unix.Preview.cs | 20 + ...larationTest.InstanceTest.Unix.Preview.xml | 21 + ...ionTest.InstanceTest.Windows.Compatible.cs | 20 + ...onTest.InstanceTest.Windows.Compatible.xml | 21 + ...rationTest.InstanceTest.Windows.Default.cs | 20 + ...ationTest.InstanceTest.Windows.Default.xml | 21 + ...arationTest.InstanceTest.Windows.Latest.cs | 20 + ...rationTest.InstanceTest.Windows.Latest.xml | 21 + ...rationTest.InstanceTest.Windows.Preview.cs | 20 + ...ationTest.InstanceTest.Windows.Preview.xml | 21 + ...est.MacrosExpansionTest.Unix.Compatible.cs | 19 + ...st.MacrosExpansionTest.Unix.Compatible.xml | 23 + ...onTest.MacrosExpansionTest.Unix.Default.cs | 19 + ...nTest.MacrosExpansionTest.Unix.Default.xml | 23 + ...ionTest.MacrosExpansionTest.Unix.Latest.cs | 19 + ...onTest.MacrosExpansionTest.Unix.Latest.xml | 23 + ...onTest.MacrosExpansionTest.Unix.Preview.cs | 19 + ...nTest.MacrosExpansionTest.Unix.Preview.xml | 23 + ....MacrosExpansionTest.Windows.Compatible.cs | 19 + ...MacrosExpansionTest.Windows.Compatible.xml | 23 + ...est.MacrosExpansionTest.Windows.Default.cs | 19 + ...st.MacrosExpansionTest.Windows.Default.xml | 23 + ...Test.MacrosExpansionTest.Windows.Latest.cs | 19 + ...est.MacrosExpansionTest.Windows.Latest.xml | 23 + ...est.MacrosExpansionTest.Windows.Preview.cs | 19 + ...st.MacrosExpansionTest.Windows.Preview.xml | 23 + ...tionTest.MemberCallTest.Unix.Compatible.cs | 35 + ...ionTest.MemberCallTest.Unix.Compatible.xml | 38 + ...arationTest.MemberCallTest.Unix.Default.cs | 35 + ...rationTest.MemberCallTest.Unix.Default.xml | 38 + ...larationTest.MemberCallTest.Unix.Latest.cs | 35 + ...arationTest.MemberCallTest.Unix.Latest.xml | 38 + ...arationTest.MemberCallTest.Unix.Preview.cs | 35 + ...rationTest.MemberCallTest.Unix.Preview.xml | 38 + ...nTest.MemberCallTest.Windows.Compatible.cs | 35 + ...Test.MemberCallTest.Windows.Compatible.xml | 38 + ...tionTest.MemberCallTest.Windows.Default.cs | 35 + ...ionTest.MemberCallTest.Windows.Default.xml | 38 + ...ationTest.MemberCallTest.Windows.Latest.cs | 35 + ...tionTest.MemberCallTest.Windows.Latest.xml | 38 + ...tionTest.MemberCallTest.Windows.Preview.cs | 35 + ...ionTest.MemberCallTest.Windows.Preview.xml | 38 + ...larationTest.MemberTest.Unix.Compatible.cs | 12 + ...arationTest.MemberTest.Unix.Compatible.xml | 14 + ...DeclarationTest.MemberTest.Unix.Default.cs | 12 + ...eclarationTest.MemberTest.Unix.Default.xml | 14 + ...dDeclarationTest.MemberTest.Unix.Latest.cs | 12 + ...DeclarationTest.MemberTest.Unix.Latest.xml | 14 + ...DeclarationTest.MemberTest.Unix.Preview.cs | 12 + ...eclarationTest.MemberTest.Unix.Preview.xml | 14 + ...ationTest.MemberTest.Windows.Compatible.cs | 12 + ...tionTest.MemberTest.Windows.Compatible.xml | 14 + ...larationTest.MemberTest.Windows.Default.cs | 12 + ...arationTest.MemberTest.Windows.Default.xml | 14 + ...clarationTest.MemberTest.Windows.Latest.cs | 12 + ...larationTest.MemberTest.Windows.Latest.xml | 14 + ...larationTest.MemberTest.Windows.Preview.cs | 12 + ...arationTest.MemberTest.Windows.Preview.xml | 14 + ...tionTest.NewKeywordTest.Unix.Compatible.cs | 75 + ...ionTest.NewKeywordTest.Unix.Compatible.xml | 84 + ...arationTest.NewKeywordTest.Unix.Default.cs | 75 + ...rationTest.NewKeywordTest.Unix.Default.xml | 84 + ...larationTest.NewKeywordTest.Unix.Latest.cs | 75 + ...arationTest.NewKeywordTest.Unix.Latest.xml | 84 + ...arationTest.NewKeywordTest.Unix.Preview.cs | 75 + ...rationTest.NewKeywordTest.Unix.Preview.xml | 84 + ...nTest.NewKeywordTest.Windows.Compatible.cs | 75 + ...Test.NewKeywordTest.Windows.Compatible.xml | 84 + ...tionTest.NewKeywordTest.Windows.Default.cs | 75 + ...ionTest.NewKeywordTest.Windows.Default.xml | 84 + ...ationTest.NewKeywordTest.Windows.Latest.cs | 75 + ...tionTest.NewKeywordTest.Windows.Latest.xml | 84 + ...tionTest.NewKeywordTest.Windows.Preview.cs | 75 + ...ionTest.NewKeywordTest.Windows.Preview.xml | 84 + ...t.NewKeywordVirtualTest.Unix.Compatible.cs | 43 + ....NewKeywordVirtualTest.Unix.Compatible.xml | 73 + ...Test.NewKeywordVirtualTest.Unix.Default.cs | 24 + ...est.NewKeywordVirtualTest.Unix.Default.xml | 37 + ...nTest.NewKeywordVirtualTest.Unix.Latest.cs | 24 + ...Test.NewKeywordVirtualTest.Unix.Latest.xml | 37 + ...Test.NewKeywordVirtualTest.Unix.Preview.cs | 24 + ...est.NewKeywordVirtualTest.Unix.Preview.xml | 37 + ...ewKeywordVirtualTest.Windows.Compatible.cs | 43 + ...wKeywordVirtualTest.Windows.Compatible.xml | 73 + ...t.NewKeywordVirtualTest.Windows.Default.cs | 24 + ....NewKeywordVirtualTest.Windows.Default.xml | 37 + ...st.NewKeywordVirtualTest.Windows.Latest.cs | 24 + ...t.NewKeywordVirtualTest.Windows.Latest.xml | 37 + ...t.NewKeywordVirtualTest.Windows.Preview.cs | 24 + ....NewKeywordVirtualTest.Windows.Preview.xml | 37 + ...lAndMarkerInterfaceTest.Unix.Compatible.cs | 64 + ...AndMarkerInterfaceTest.Unix.Compatible.xml | 104 + ...VtblAndMarkerInterfaceTest.Unix.Default.cs | 46 + ...tblAndMarkerInterfaceTest.Unix.Default.xml | 68 + ...tVtblAndMarkerInterfaceTest.Unix.Latest.cs | 46 + ...VtblAndMarkerInterfaceTest.Unix.Latest.xml | 68 + ...VtblAndMarkerInterfaceTest.Unix.Preview.cs | 46 + ...tblAndMarkerInterfaceTest.Unix.Preview.xml | 68 + ...dMarkerInterfaceTest.Windows.Compatible.cs | 64 + ...MarkerInterfaceTest.Windows.Compatible.xml | 104 + ...lAndMarkerInterfaceTest.Windows.Default.cs | 46 + ...AndMarkerInterfaceTest.Windows.Default.xml | 68 + ...blAndMarkerInterfaceTest.Windows.Latest.cs | 46 + ...lAndMarkerInterfaceTest.Windows.Latest.xml | 68 + ...lAndMarkerInterfaceTest.Windows.Preview.cs | 46 + ...AndMarkerInterfaceTest.Windows.Preview.xml | 68 + ...ualWithExplicitVtblTest.Unix.Compatible.cs | 55 + ...alWithExplicitVtblTest.Unix.Compatible.xml | 84 + ...irtualWithExplicitVtblTest.Unix.Default.cs | 36 + ...rtualWithExplicitVtblTest.Unix.Default.xml | 48 + ...VirtualWithExplicitVtblTest.Unix.Latest.cs | 36 + ...irtualWithExplicitVtblTest.Unix.Latest.xml | 48 + ...irtualWithExplicitVtblTest.Unix.Preview.cs | 36 + ...rtualWithExplicitVtblTest.Unix.Preview.xml | 48 + ...WithExplicitVtblTest.Windows.Compatible.cs | 55 + ...ithExplicitVtblTest.Windows.Compatible.xml | 84 + ...ualWithExplicitVtblTest.Windows.Default.cs | 36 + ...alWithExplicitVtblTest.Windows.Default.xml | 48 + ...tualWithExplicitVtblTest.Windows.Latest.cs | 36 + ...ualWithExplicitVtblTest.Windows.Latest.xml | 48 + ...ualWithExplicitVtblTest.Windows.Preview.cs | 36 + ...alWithExplicitVtblTest.Windows.Preview.xml | 48 + ...onTest.OperatorCallTest.Unix.Compatible.cs | 35 + ...nTest.OperatorCallTest.Unix.Compatible.xml | 59 + ...ationTest.OperatorCallTest.Unix.Default.cs | 35 + ...tionTest.OperatorCallTest.Unix.Default.xml | 59 + ...rationTest.OperatorCallTest.Unix.Latest.cs | 35 + ...ationTest.OperatorCallTest.Unix.Latest.xml | 59 + ...ationTest.OperatorCallTest.Unix.Preview.cs | 35 + ...tionTest.OperatorCallTest.Unix.Preview.xml | 59 + ...est.OperatorCallTest.Windows.Compatible.cs | 35 + ...st.OperatorCallTest.Windows.Compatible.xml | 59 + ...onTest.OperatorCallTest.Windows.Default.cs | 35 + ...nTest.OperatorCallTest.Windows.Default.xml | 59 + ...ionTest.OperatorCallTest.Windows.Latest.cs | 35 + ...onTest.OperatorCallTest.Windows.Latest.xml | 59 + ...onTest.OperatorCallTest.Windows.Preview.cs | 35 + ...nTest.OperatorCallTest.Windows.Preview.xml | 59 + ...rationTest.OperatorTest.Unix.Compatible.cs | 25 + ...ationTest.OperatorTest.Unix.Compatible.xml | 39 + ...clarationTest.OperatorTest.Unix.Default.cs | 25 + ...larationTest.OperatorTest.Unix.Default.xml | 39 + ...eclarationTest.OperatorTest.Unix.Latest.cs | 25 + ...clarationTest.OperatorTest.Unix.Latest.xml | 39 + ...clarationTest.OperatorTest.Unix.Preview.cs | 25 + ...larationTest.OperatorTest.Unix.Preview.xml | 39 + ...ionTest.OperatorTest.Windows.Compatible.cs | 25 + ...onTest.OperatorTest.Windows.Compatible.xml | 39 + ...rationTest.OperatorTest.Windows.Default.cs | 25 + ...ationTest.OperatorTest.Windows.Default.xml | 39 + ...arationTest.OperatorTest.Windows.Latest.cs | 25 + ...rationTest.OperatorTest.Windows.Latest.xml | 39 + ...rationTest.OperatorTest.Windows.Preview.cs | 25 + ...ationTest.OperatorTest.Windows.Preview.xml | 39 + ...larationTest.StaticTest.Unix.Compatible.cs | 20 + ...arationTest.StaticTest.Unix.Compatible.xml | 18 + ...DeclarationTest.StaticTest.Unix.Default.cs | 20 + ...eclarationTest.StaticTest.Unix.Default.xml | 18 + ...dDeclarationTest.StaticTest.Unix.Latest.cs | 20 + ...DeclarationTest.StaticTest.Unix.Latest.xml | 18 + ...DeclarationTest.StaticTest.Unix.Preview.cs | 20 + ...eclarationTest.StaticTest.Unix.Preview.xml | 18 + ...ationTest.StaticTest.Windows.Compatible.cs | 20 + ...tionTest.StaticTest.Windows.Compatible.xml | 18 + ...larationTest.StaticTest.Windows.Default.cs | 20 + ...arationTest.StaticTest.Windows.Default.xml | 18 + ...clarationTest.StaticTest.Windows.Latest.cs | 20 + ...larationTest.StaticTest.Windows.Latest.xml | 18 + ...larationTest.StaticTest.Windows.Preview.cs | 20 + ...arationTest.StaticTest.Windows.Preview.xml | 18 + ...eclarationTest.ThisTest.Unix.Compatible.cs | 12 + ...clarationTest.ThisTest.Unix.Compatible.xml | 14 + ...odDeclarationTest.ThisTest.Unix.Default.cs | 12 + ...dDeclarationTest.ThisTest.Unix.Default.xml | 14 + ...hodDeclarationTest.ThisTest.Unix.Latest.cs | 12 + ...odDeclarationTest.ThisTest.Unix.Latest.xml | 14 + ...odDeclarationTest.ThisTest.Unix.Preview.cs | 12 + ...dDeclarationTest.ThisTest.Unix.Preview.xml | 14 + ...arationTest.ThisTest.Windows.Compatible.cs | 12 + ...rationTest.ThisTest.Windows.Compatible.xml | 14 + ...eclarationTest.ThisTest.Windows.Default.cs | 12 + ...clarationTest.ThisTest.Windows.Default.xml | 14 + ...DeclarationTest.ThisTest.Windows.Latest.cs | 12 + ...eclarationTest.ThisTest.Windows.Latest.xml | 14 + ...eclarationTest.ThisTest.Windows.Preview.cs | 12 + ...clarationTest.ThisTest.Windows.Preview.xml | 14 + ...sNotImpactDllImportTest.Unix.Compatible.cs | 18 + ...NotImpactDllImportTest.Unix.Compatible.xml | 16 + ...DoesNotImpactDllImportTest.Unix.Default.cs | 18 + ...oesNotImpactDllImportTest.Unix.Default.xml | 16 + ...eDoesNotImpactDllImportTest.Unix.Latest.cs | 18 + ...DoesNotImpactDllImportTest.Unix.Latest.xml | 16 + ...DoesNotImpactDllImportTest.Unix.Preview.cs | 18 + ...oesNotImpactDllImportTest.Unix.Preview.xml | 16 + ...tImpactDllImportTest.Windows.Compatible.cs | 18 + ...ImpactDllImportTest.Windows.Compatible.xml | 16 + ...sNotImpactDllImportTest.Windows.Default.cs | 18 + ...NotImpactDllImportTest.Windows.Default.xml | 16 + ...esNotImpactDllImportTest.Windows.Latest.cs | 18 + ...sNotImpactDllImportTest.Windows.Latest.xml | 16 + ...sNotImpactDllImportTest.Windows.Preview.cs | 18 + ...NotImpactDllImportTest.Windows.Preview.xml | 16 + ...arationTest.VirtualTest.Unix.Compatible.cs | 56 + ...rationTest.VirtualTest.Unix.Compatible.xml | 70 + ...eclarationTest.VirtualTest.Unix.Default.cs | 30 + ...clarationTest.VirtualTest.Unix.Default.xml | 34 + ...DeclarationTest.VirtualTest.Unix.Latest.cs | 30 + ...eclarationTest.VirtualTest.Unix.Latest.xml | 34 + ...eclarationTest.VirtualTest.Unix.Preview.cs | 30 + ...clarationTest.VirtualTest.Unix.Preview.xml | 34 + ...tionTest.VirtualTest.Windows.Compatible.cs | 56 + ...ionTest.VirtualTest.Windows.Compatible.xml | 70 + ...arationTest.VirtualTest.Windows.Default.cs | 30 + ...rationTest.VirtualTest.Windows.Default.xml | 34 + ...larationTest.VirtualTest.Windows.Latest.cs | 30 + ...arationTest.VirtualTest.Windows.Latest.xml | 34 + ...arationTest.VirtualTest.Windows.Preview.cs | 30 + ...rationTest.VirtualTest.Windows.Preview.xml | 34 + ...hVtblIndexAttributeTest.Unix.Compatible.cs | 60 + ...VtblIndexAttributeTest.Unix.Compatible.xml | 70 + ...WithVtblIndexAttributeTest.Unix.Default.cs | 34 + ...ithVtblIndexAttributeTest.Unix.Default.xml | 34 + ...lWithVtblIndexAttributeTest.Unix.Latest.cs | 34 + ...WithVtblIndexAttributeTest.Unix.Latest.xml | 34 + ...WithVtblIndexAttributeTest.Unix.Preview.cs | 34 + ...ithVtblIndexAttributeTest.Unix.Preview.xml | 34 + ...blIndexAttributeTest.Windows.Compatible.cs | 60 + ...lIndexAttributeTest.Windows.Compatible.xml | 70 + ...hVtblIndexAttributeTest.Windows.Default.cs | 34 + ...VtblIndexAttributeTest.Windows.Default.xml | 34 + ...thVtblIndexAttributeTest.Windows.Latest.cs | 34 + ...hVtblIndexAttributeTest.Windows.Latest.xml | 34 + ...hVtblIndexAttributeTest.Windows.Preview.cs | 34 + ...VtblIndexAttributeTest.Windows.Preview.xml | 34 + ...ToObsoleteTest.EnumDecl.Unix.Compatible.cs | 26 + ...oObsoleteTest.EnumDecl.Unix.Compatible.xml | 31 + ...tedToObsoleteTest.EnumDecl.Unix.Default.cs | 26 + ...edToObsoleteTest.EnumDecl.Unix.Default.xml | 31 + ...atedToObsoleteTest.EnumDecl.Unix.Latest.cs | 26 + ...tedToObsoleteTest.EnumDecl.Unix.Latest.xml | 31 + ...tedToObsoleteTest.EnumDecl.Unix.Preview.cs | 26 + ...edToObsoleteTest.EnumDecl.Unix.Preview.xml | 31 + ...bsoleteTest.EnumDecl.Windows.Compatible.cs | 26 + ...soleteTest.EnumDecl.Windows.Compatible.xml | 31 + ...ToObsoleteTest.EnumDecl.Windows.Default.cs | 26 + ...oObsoleteTest.EnumDecl.Windows.Default.xml | 31 + ...dToObsoleteTest.EnumDecl.Windows.Latest.cs | 26 + ...ToObsoleteTest.EnumDecl.Windows.Latest.xml | 31 + ...ToObsoleteTest.EnumDecl.Windows.Preview.cs | 26 + ...oObsoleteTest.EnumDecl.Windows.Preview.xml | 31 + ...ToObsoleteTest.FuncDecl.Unix.Compatible.cs | 25 + ...oObsoleteTest.FuncDecl.Unix.Compatible.xml | 25 + ...tedToObsoleteTest.FuncDecl.Unix.Default.cs | 25 + ...edToObsoleteTest.FuncDecl.Unix.Default.xml | 25 + ...atedToObsoleteTest.FuncDecl.Unix.Latest.cs | 25 + ...tedToObsoleteTest.FuncDecl.Unix.Latest.xml | 25 + ...tedToObsoleteTest.FuncDecl.Unix.Preview.cs | 25 + ...edToObsoleteTest.FuncDecl.Unix.Preview.xml | 25 + ...bsoleteTest.FuncDecl.Windows.Compatible.cs | 25 + ...soleteTest.FuncDecl.Windows.Compatible.xml | 25 + ...ToObsoleteTest.FuncDecl.Windows.Default.cs | 25 + ...oObsoleteTest.FuncDecl.Windows.Default.xml | 25 + ...dToObsoleteTest.FuncDecl.Windows.Latest.cs | 25 + ...ToObsoleteTest.FuncDecl.Windows.Latest.xml | 25 + ...ToObsoleteTest.FuncDecl.Windows.Preview.cs | 25 + ...oObsoleteTest.FuncDecl.Windows.Preview.xml | 25 + ...oleteTest.FuncDllImport.Unix.Compatible.cs | 22 + ...leteTest.FuncDllImport.Unix.Compatible.xml | 21 + ...ObsoleteTest.FuncDllImport.Unix.Default.cs | 22 + ...bsoleteTest.FuncDllImport.Unix.Default.xml | 21 + ...oObsoleteTest.FuncDllImport.Unix.Latest.cs | 22 + ...ObsoleteTest.FuncDllImport.Unix.Latest.xml | 21 + ...ObsoleteTest.FuncDllImport.Unix.Preview.cs | 22 + ...bsoleteTest.FuncDllImport.Unix.Preview.xml | 21 + ...teTest.FuncDllImport.Windows.Compatible.cs | 22 + ...eTest.FuncDllImport.Windows.Compatible.xml | 21 + ...oleteTest.FuncDllImport.Windows.Default.cs | 22 + ...leteTest.FuncDllImport.Windows.Default.xml | 21 + ...soleteTest.FuncDllImport.Windows.Latest.cs | 22 + ...oleteTest.FuncDllImport.Windows.Latest.xml | 21 + ...oleteTest.FuncDllImport.Windows.Preview.cs | 22 + ...leteTest.FuncDllImport.Windows.Preview.xml | 21 + ...bsoleteTest.FuncPtrDecl.Unix.Compatible.cs | 45 + ...soleteTest.FuncPtrDecl.Unix.Compatible.xml | 41 + ...ToObsoleteTest.FuncPtrDecl.Unix.Default.cs | 30 + ...oObsoleteTest.FuncPtrDecl.Unix.Default.xml | 27 + ...dToObsoleteTest.FuncPtrDecl.Unix.Latest.cs | 30 + ...ToObsoleteTest.FuncPtrDecl.Unix.Latest.xml | 27 + ...ToObsoleteTest.FuncPtrDecl.Unix.Preview.cs | 30 + ...oObsoleteTest.FuncPtrDecl.Unix.Preview.xml | 27 + ...leteTest.FuncPtrDecl.Windows.Compatible.cs | 45 + ...eteTest.FuncPtrDecl.Windows.Compatible.xml | 41 + ...bsoleteTest.FuncPtrDecl.Windows.Default.cs | 30 + ...soleteTest.FuncPtrDecl.Windows.Default.xml | 27 + ...ObsoleteTest.FuncPtrDecl.Windows.Latest.cs | 30 + ...bsoleteTest.FuncPtrDecl.Windows.Latest.xml | 27 + ...bsoleteTest.FuncPtrDecl.Windows.Preview.cs | 30 + ...soleteTest.FuncPtrDecl.Windows.Preview.xml | 27 + ...soleteTest.InstanceFunc.Unix.Compatible.cs | 29 + ...oleteTest.InstanceFunc.Unix.Compatible.xml | 25 + ...oObsoleteTest.InstanceFunc.Unix.Default.cs | 29 + ...ObsoleteTest.InstanceFunc.Unix.Default.xml | 25 + ...ToObsoleteTest.InstanceFunc.Unix.Latest.cs | 29 + ...oObsoleteTest.InstanceFunc.Unix.Latest.xml | 25 + ...oObsoleteTest.InstanceFunc.Unix.Preview.cs | 29 + ...ObsoleteTest.InstanceFunc.Unix.Preview.xml | 25 + ...eteTest.InstanceFunc.Windows.Compatible.cs | 29 + ...teTest.InstanceFunc.Windows.Compatible.xml | 25 + ...soleteTest.InstanceFunc.Windows.Default.cs | 29 + ...oleteTest.InstanceFunc.Windows.Default.xml | 25 + ...bsoleteTest.InstanceFunc.Windows.Latest.cs | 29 + ...soleteTest.InstanceFunc.Windows.Latest.xml | 25 + ...soleteTest.InstanceFunc.Windows.Preview.cs | 29 + ...oleteTest.InstanceFunc.Windows.Preview.xml | 25 + ...eTest.SimpleEnumMembers.Unix.Compatible.cs | 14 + ...Test.SimpleEnumMembers.Unix.Compatible.xml | 22 + ...leteTest.SimpleEnumMembers.Unix.Default.cs | 14 + ...eteTest.SimpleEnumMembers.Unix.Default.xml | 22 + ...oleteTest.SimpleEnumMembers.Unix.Latest.cs | 14 + ...leteTest.SimpleEnumMembers.Unix.Latest.xml | 22 + ...leteTest.SimpleEnumMembers.Unix.Preview.cs | 14 + ...eteTest.SimpleEnumMembers.Unix.Preview.xml | 22 + ...st.SimpleEnumMembers.Windows.Compatible.cs | 14 + ...t.SimpleEnumMembers.Windows.Compatible.xml | 22 + ...eTest.SimpleEnumMembers.Windows.Default.cs | 14 + ...Test.SimpleEnumMembers.Windows.Default.xml | 22 + ...teTest.SimpleEnumMembers.Windows.Latest.cs | 14 + ...eTest.SimpleEnumMembers.Windows.Latest.xml | 22 + ...eTest.SimpleEnumMembers.Windows.Preview.cs | 14 + ...Test.SimpleEnumMembers.Windows.Preview.xml | 22 + ...SimpleStructMembers.int.Unix.Compatible.cs | 17 + ...impleStructMembers.int.Unix.Compatible.xml | 21 + ...st.SimpleStructMembers.int.Unix.Default.cs | 17 + ...t.SimpleStructMembers.int.Unix.Default.xml | 21 + ...est.SimpleStructMembers.int.Unix.Latest.cs | 17 + ...st.SimpleStructMembers.int.Unix.Latest.xml | 21 + ...st.SimpleStructMembers.int.Unix.Preview.cs | 17 + ...t.SimpleStructMembers.int.Unix.Preview.xml | 21 + ...pleStructMembers.int.Windows.Compatible.cs | 17 + ...leStructMembers.int.Windows.Compatible.xml | 21 + ...SimpleStructMembers.int.Windows.Default.cs | 17 + ...impleStructMembers.int.Windows.Default.xml | 21 + ....SimpleStructMembers.int.Windows.Latest.cs | 17 + ...SimpleStructMembers.int.Windows.Latest.xml | 21 + ...SimpleStructMembers.int.Windows.Preview.cs | 17 + ...impleStructMembers.int.Windows.Preview.xml | 21 + ...ypedefStructMembers.int.Unix.Compatible.cs | 17 + ...pedefStructMembers.int.Unix.Compatible.xml | 21 + ...leTypedefStructMembers.int.Unix.Default.cs | 17 + ...eTypedefStructMembers.int.Unix.Default.xml | 21 + ...pleTypedefStructMembers.int.Unix.Latest.cs | 17 + ...leTypedefStructMembers.int.Unix.Latest.xml | 21 + ...leTypedefStructMembers.int.Unix.Preview.cs | 17 + ...eTypedefStructMembers.int.Unix.Preview.xml | 21 + ...defStructMembers.int.Windows.Compatible.cs | 17 + ...efStructMembers.int.Windows.Compatible.xml | 21 + ...ypedefStructMembers.int.Windows.Default.cs | 17 + ...pedefStructMembers.int.Windows.Default.xml | 21 + ...TypedefStructMembers.int.Windows.Latest.cs | 17 + ...ypedefStructMembers.int.Windows.Latest.xml | 21 + ...ypedefStructMembers.int.Windows.Preview.cs | 17 + ...pedefStructMembers.int.Windows.Preview.xml | 21 + ...eTest.SimpleVarDecl.int.Unix.Compatible.cs | 17 + ...Test.SimpleVarDecl.int.Unix.Compatible.xml | 33 + ...leteTest.SimpleVarDecl.int.Unix.Default.cs | 17 + ...eteTest.SimpleVarDecl.int.Unix.Default.xml | 33 + ...oleteTest.SimpleVarDecl.int.Unix.Latest.cs | 17 + ...leteTest.SimpleVarDecl.int.Unix.Latest.xml | 33 + ...leteTest.SimpleVarDecl.int.Unix.Preview.cs | 17 + ...eteTest.SimpleVarDecl.int.Unix.Preview.xml | 33 + ...st.SimpleVarDecl.int.Windows.Compatible.cs | 17 + ...t.SimpleVarDecl.int.Windows.Compatible.xml | 33 + ...eTest.SimpleVarDecl.int.Windows.Default.cs | 17 + ...Test.SimpleVarDecl.int.Windows.Default.xml | 33 + ...teTest.SimpleVarDecl.int.Windows.Latest.cs | 17 + ...eTest.SimpleVarDecl.int.Windows.Latest.xml | 33 + ...eTest.SimpleVarDecl.int.Windows.Preview.cs | 17 + ...Test.SimpleVarDecl.int.Windows.Preview.xml | 33 + ...ObsoleteTest.StructDecl.Unix.Compatible.cs | 26 + ...bsoleteTest.StructDecl.Unix.Compatible.xml | 27 + ...dToObsoleteTest.StructDecl.Unix.Default.cs | 26 + ...ToObsoleteTest.StructDecl.Unix.Default.xml | 27 + ...edToObsoleteTest.StructDecl.Unix.Latest.cs | 26 + ...dToObsoleteTest.StructDecl.Unix.Latest.xml | 27 + ...dToObsoleteTest.StructDecl.Unix.Preview.cs | 26 + ...ToObsoleteTest.StructDecl.Unix.Preview.xml | 27 + ...oleteTest.StructDecl.Windows.Compatible.cs | 26 + ...leteTest.StructDecl.Windows.Compatible.xml | 27 + ...ObsoleteTest.StructDecl.Windows.Default.cs | 26 + ...bsoleteTest.StructDecl.Windows.Default.xml | 27 + ...oObsoleteTest.StructDecl.Windows.Latest.cs | 26 + ...ObsoleteTest.StructDecl.Windows.Latest.xml | 27 + ...ObsoleteTest.StructDecl.Windows.Preview.cs | 26 + ...bsoleteTest.StructDecl.Windows.Preview.xml | 27 + ...eTest.TypedefStructDecl.Unix.Compatible.cs | 26 + ...Test.TypedefStructDecl.Unix.Compatible.xml | 27 + ...leteTest.TypedefStructDecl.Unix.Default.cs | 26 + ...eteTest.TypedefStructDecl.Unix.Default.xml | 27 + ...oleteTest.TypedefStructDecl.Unix.Latest.cs | 26 + ...leteTest.TypedefStructDecl.Unix.Latest.xml | 27 + ...leteTest.TypedefStructDecl.Unix.Preview.cs | 26 + ...eteTest.TypedefStructDecl.Unix.Preview.xml | 27 + ...st.TypedefStructDecl.Windows.Compatible.cs | 26 + ...t.TypedefStructDecl.Windows.Compatible.xml | 27 + ...eTest.TypedefStructDecl.Windows.Default.cs | 26 + ...Test.TypedefStructDecl.Windows.Default.xml | 27 + ...teTest.TypedefStructDecl.Windows.Latest.cs | 26 + ...eTest.TypedefStructDecl.Windows.Latest.xml | 27 + ...eTest.TypedefStructDecl.Windows.Preview.cs | 26 + ...Test.TypedefStructDecl.Windows.Preview.xml | 27 + ...clarationTest.BasicTest.Unix.Compatible.cs | 9 + ...larationTest.BasicTest.Unix.Compatible.xml | 17 + ...mDeclarationTest.BasicTest.Unix.Default.cs | 9 + ...DeclarationTest.BasicTest.Unix.Default.xml | 17 + ...umDeclarationTest.BasicTest.Unix.Latest.cs | 9 + ...mDeclarationTest.BasicTest.Unix.Latest.xml | 17 + ...mDeclarationTest.BasicTest.Unix.Preview.cs | 9 + ...DeclarationTest.BasicTest.Unix.Preview.xml | 17 + ...rationTest.BasicTest.Windows.Compatible.cs | 9 + ...ationTest.BasicTest.Windows.Compatible.xml | 17 + ...clarationTest.BasicTest.Windows.Default.cs | 9 + ...larationTest.BasicTest.Windows.Default.xml | 17 + ...eclarationTest.BasicTest.Windows.Latest.cs | 9 + ...clarationTest.BasicTest.Windows.Latest.xml | 17 + ...clarationTest.BasicTest.Windows.Preview.cs | 9 + ...larationTest.BasicTest.Windows.Preview.xml | 17 + ...tionTest.BasicValueTest.Unix.Compatible.cs | 9 + ...ionTest.BasicValueTest.Unix.Compatible.xml | 20 + ...arationTest.BasicValueTest.Unix.Default.cs | 9 + ...rationTest.BasicValueTest.Unix.Default.xml | 20 + ...larationTest.BasicValueTest.Unix.Latest.cs | 9 + ...arationTest.BasicValueTest.Unix.Latest.xml | 20 + ...arationTest.BasicValueTest.Unix.Preview.cs | 9 + ...rationTest.BasicValueTest.Unix.Preview.xml | 20 + ...nTest.BasicValueTest.Windows.Compatible.cs | 9 + ...Test.BasicValueTest.Windows.Compatible.xml | 20 + ...tionTest.BasicValueTest.Windows.Default.cs | 9 + ...ionTest.BasicValueTest.Windows.Default.xml | 20 + ...ationTest.BasicValueTest.Windows.Latest.cs | 9 + ...tionTest.BasicValueTest.Windows.Latest.xml | 20 + ...tionTest.BasicValueTest.Windows.Preview.cs | 9 + ...ionTest.BasicValueTest.Windows.Preview.xml | 20 + ...arationTest.ExcludeTest.Unix.Compatible.cs | 0 ...rationTest.ExcludeTest.Unix.Compatible.xml | 0 ...eclarationTest.ExcludeTest.Unix.Default.cs | 0 ...clarationTest.ExcludeTest.Unix.Default.xml | 0 ...DeclarationTest.ExcludeTest.Unix.Latest.cs | 0 ...eclarationTest.ExcludeTest.Unix.Latest.xml | 0 ...eclarationTest.ExcludeTest.Unix.Preview.cs | 0 ...clarationTest.ExcludeTest.Unix.Preview.xml | 0 ...tionTest.ExcludeTest.Windows.Compatible.cs | 0 ...ionTest.ExcludeTest.Windows.Compatible.xml | 0 ...arationTest.ExcludeTest.Windows.Default.cs | 0 ...rationTest.ExcludeTest.Windows.Default.xml | 0 ...larationTest.ExcludeTest.Windows.Latest.cs | 0 ...arationTest.ExcludeTest.Windows.Latest.xml | 0 ...arationTest.ExcludeTest.Windows.Preview.cs | 0 ...rationTest.ExcludeTest.Windows.Preview.xml | 0 ...t.ExplicitTypedTest.int.Unix.Compatible.cs | 9 + ....ExplicitTypedTest.int.Unix.Compatible.xml | 17 + ...Test.ExplicitTypedTest.int.Unix.Default.cs | 9 + ...est.ExplicitTypedTest.int.Unix.Default.xml | 17 + ...nTest.ExplicitTypedTest.int.Unix.Latest.cs | 9 + ...Test.ExplicitTypedTest.int.Unix.Latest.xml | 17 + ...Test.ExplicitTypedTest.int.Unix.Preview.cs | 9 + ...est.ExplicitTypedTest.int.Unix.Preview.xml | 17 + ...xplicitTypedTest.int.Windows.Compatible.cs | 9 + ...plicitTypedTest.int.Windows.Compatible.xml | 17 + ...t.ExplicitTypedTest.int.Windows.Default.cs | 9 + ....ExplicitTypedTest.int.Windows.Default.xml | 17 + ...st.ExplicitTypedTest.int.Windows.Latest.cs | 9 + ...t.ExplicitTypedTest.int.Windows.Latest.xml | 17 + ...t.ExplicitTypedTest.int.Windows.Preview.cs | 9 + ....ExplicitTypedTest.int.Windows.Preview.xml | 17 + ...icitTypedTest.long long.Unix.Compatible.cs | 10 + ...citTypedTest.long long.Unix.Compatible.xml | 17 + ...xplicitTypedTest.long long.Unix.Default.cs | 10 + ...plicitTypedTest.long long.Unix.Default.xml | 17 + ...ExplicitTypedTest.long long.Unix.Latest.cs | 10 + ...xplicitTypedTest.long long.Unix.Latest.xml | 17 + ...xplicitTypedTest.long long.Unix.Preview.cs | 10 + ...plicitTypedTest.long long.Unix.Preview.xml | 17 + ...tTypedTest.long long.Windows.Compatible.cs | 10 + ...TypedTest.long long.Windows.Compatible.xml | 17 + ...icitTypedTest.long long.Windows.Default.cs | 10 + ...citTypedTest.long long.Windows.Default.xml | 17 + ...licitTypedTest.long long.Windows.Latest.cs | 10 + ...icitTypedTest.long long.Windows.Latest.xml | 17 + ...icitTypedTest.long long.Windows.Preview.cs | 10 + ...citTypedTest.long long.Windows.Preview.xml | 17 + ...ExplicitTypedTest.short.Unix.Compatible.cs | 9 + ...xplicitTypedTest.short.Unix.Compatible.xml | 17 + ...st.ExplicitTypedTest.short.Unix.Default.cs | 9 + ...t.ExplicitTypedTest.short.Unix.Default.xml | 17 + ...est.ExplicitTypedTest.short.Unix.Latest.cs | 9 + ...st.ExplicitTypedTest.short.Unix.Latest.xml | 17 + ...st.ExplicitTypedTest.short.Unix.Preview.cs | 9 + ...t.ExplicitTypedTest.short.Unix.Preview.xml | 17 + ...licitTypedTest.short.Windows.Compatible.cs | 9 + ...icitTypedTest.short.Windows.Compatible.xml | 17 + ...ExplicitTypedTest.short.Windows.Default.cs | 9 + ...xplicitTypedTest.short.Windows.Default.xml | 17 + ....ExplicitTypedTest.short.Windows.Latest.cs | 9 + ...ExplicitTypedTest.short.Windows.Latest.xml | 17 + ...ExplicitTypedTest.short.Windows.Preview.cs | 9 + ...xplicitTypedTest.short.Windows.Preview.xml | 17 + ...licitTypedTest.unsigned.Unix.Compatible.cs | 10 + ...icitTypedTest.unsigned.Unix.Compatible.xml | 17 + ...ExplicitTypedTest.unsigned.Unix.Default.cs | 10 + ...xplicitTypedTest.unsigned.Unix.Default.xml | 17 + ....ExplicitTypedTest.unsigned.Unix.Latest.cs | 10 + ...ExplicitTypedTest.unsigned.Unix.Latest.xml | 17 + ...ExplicitTypedTest.unsigned.Unix.Preview.cs | 10 + ...xplicitTypedTest.unsigned.Unix.Preview.xml | 17 + ...itTypedTest.unsigned.Windows.Compatible.cs | 10 + ...tTypedTest.unsigned.Windows.Compatible.xml | 17 + ...licitTypedTest.unsigned.Windows.Default.cs | 10 + ...icitTypedTest.unsigned.Windows.Default.xml | 17 + ...plicitTypedTest.unsigned.Windows.Latest.cs | 10 + ...licitTypedTest.unsigned.Windows.Latest.xml | 17 + ...licitTypedTest.unsigned.Windows.Preview.cs | 10 + ...icitTypedTest.unsigned.Windows.Preview.xml | 17 + ...eTypeNameTest.long long.Unix.Compatible.cs | 10 + ...TypeNameTest.long long.Unix.Compatible.xml | 17 + ...tiveTypeNameTest.long long.Unix.Default.cs | 10 + ...iveTypeNameTest.long long.Unix.Default.xml | 17 + ...ativeTypeNameTest.long long.Unix.Latest.cs | 10 + ...tiveTypeNameTest.long long.Unix.Latest.xml | 17 + ...tiveTypeNameTest.long long.Unix.Preview.cs | 10 + ...iveTypeNameTest.long long.Unix.Preview.xml | 17 + ...peNameTest.long long.Windows.Compatible.cs | 10 + ...eNameTest.long long.Windows.Compatible.xml | 17 + ...eTypeNameTest.long long.Windows.Default.cs | 10 + ...TypeNameTest.long long.Windows.Default.xml | 17 + ...veTypeNameTest.long long.Windows.Latest.cs | 10 + ...eTypeNameTest.long long.Windows.Latest.xml | 17 + ...eTypeNameTest.long long.Windows.Preview.cs | 10 + ...TypeNameTest.long long.Windows.Preview.xml | 17 + ...ypeNameTest.signed char.Unix.Compatible.cs | 10 + ...peNameTest.signed char.Unix.Compatible.xml | 17 + ...veTypeNameTest.signed char.Unix.Default.cs | 10 + ...eTypeNameTest.signed char.Unix.Default.xml | 17 + ...iveTypeNameTest.signed char.Unix.Latest.cs | 10 + ...veTypeNameTest.signed char.Unix.Latest.xml | 17 + ...veTypeNameTest.signed char.Unix.Preview.cs | 10 + ...eTypeNameTest.signed char.Unix.Preview.xml | 17 + ...NameTest.signed char.Windows.Compatible.cs | 10 + ...ameTest.signed char.Windows.Compatible.xml | 17 + ...ypeNameTest.signed char.Windows.Default.cs | 10 + ...peNameTest.signed char.Windows.Default.xml | 17 + ...TypeNameTest.signed char.Windows.Latest.cs | 10 + ...ypeNameTest.signed char.Windows.Latest.xml | 17 + ...ypeNameTest.signed char.Windows.Preview.cs | 10 + ...peNameTest.signed char.Windows.Preview.xml | 17 + ...eNameTest.unsigned char.Unix.Compatible.cs | 10 + ...NameTest.unsigned char.Unix.Compatible.xml | 17 + ...TypeNameTest.unsigned char.Unix.Default.cs | 10 + ...ypeNameTest.unsigned char.Unix.Default.xml | 17 + ...eTypeNameTest.unsigned char.Unix.Latest.cs | 10 + ...TypeNameTest.unsigned char.Unix.Latest.xml | 17 + ...TypeNameTest.unsigned char.Unix.Preview.cs | 10 + ...ypeNameTest.unsigned char.Unix.Preview.xml | 17 + ...meTest.unsigned char.Windows.Compatible.cs | 10 + ...eTest.unsigned char.Windows.Compatible.xml | 17 + ...eNameTest.unsigned char.Windows.Default.cs | 10 + ...NameTest.unsigned char.Windows.Default.xml | 17 + ...peNameTest.unsigned char.Windows.Latest.cs | 10 + ...eNameTest.unsigned char.Windows.Latest.xml | 17 + ...eNameTest.unsigned char.Windows.Preview.cs | 10 + ...NameTest.unsigned char.Windows.Preview.xml | 17 + ...peNameTest.unsigned int.Unix.Compatible.cs | 10 + ...eNameTest.unsigned int.Unix.Compatible.xml | 17 + ...eTypeNameTest.unsigned int.Unix.Default.cs | 10 + ...TypeNameTest.unsigned int.Unix.Default.xml | 17 + ...veTypeNameTest.unsigned int.Unix.Latest.cs | 10 + ...eTypeNameTest.unsigned int.Unix.Latest.xml | 17 + ...eTypeNameTest.unsigned int.Unix.Preview.cs | 10 + ...TypeNameTest.unsigned int.Unix.Preview.xml | 17 + ...ameTest.unsigned int.Windows.Compatible.cs | 10 + ...meTest.unsigned int.Windows.Compatible.xml | 17 + ...peNameTest.unsigned int.Windows.Default.cs | 10 + ...eNameTest.unsigned int.Windows.Default.xml | 17 + ...ypeNameTest.unsigned int.Windows.Latest.cs | 10 + ...peNameTest.unsigned int.Windows.Latest.xml | 17 + ...peNameTest.unsigned int.Windows.Preview.cs | 10 + ...eNameTest.unsigned int.Windows.Preview.xml | 17 + ...Test.unsigned long long.Unix.Compatible.cs | 10 + ...est.unsigned long long.Unix.Compatible.xml | 17 + ...ameTest.unsigned long long.Unix.Default.cs | 10 + ...meTest.unsigned long long.Unix.Default.xml | 17 + ...NameTest.unsigned long long.Unix.Latest.cs | 10 + ...ameTest.unsigned long long.Unix.Latest.xml | 17 + ...ameTest.unsigned long long.Unix.Preview.cs | 10 + ...meTest.unsigned long long.Unix.Preview.xml | 17 + ...t.unsigned long long.Windows.Compatible.cs | 10 + ....unsigned long long.Windows.Compatible.xml | 17 + ...Test.unsigned long long.Windows.Default.cs | 10 + ...est.unsigned long long.Windows.Default.xml | 17 + ...eTest.unsigned long long.Windows.Latest.cs | 10 + ...Test.unsigned long long.Windows.Latest.xml | 17 + ...Test.unsigned long long.Windows.Preview.cs | 10 + ...est.unsigned long long.Windows.Preview.xml | 17 + ...NameTest.unsigned short.Unix.Compatible.cs | 10 + ...ameTest.unsigned short.Unix.Compatible.xml | 17 + ...ypeNameTest.unsigned short.Unix.Default.cs | 10 + ...peNameTest.unsigned short.Unix.Default.xml | 17 + ...TypeNameTest.unsigned short.Unix.Latest.cs | 10 + ...ypeNameTest.unsigned short.Unix.Latest.xml | 17 + ...ypeNameTest.unsigned short.Unix.Preview.cs | 10 + ...peNameTest.unsigned short.Unix.Preview.xml | 17 + ...eTest.unsigned short.Windows.Compatible.cs | 10 + ...Test.unsigned short.Windows.Compatible.xml | 17 + ...NameTest.unsigned short.Windows.Default.cs | 10 + ...ameTest.unsigned short.Windows.Default.xml | 17 + ...eNameTest.unsigned short.Windows.Latest.cs | 10 + ...NameTest.unsigned short.Windows.Latest.xml | 17 + ...NameTest.unsigned short.Windows.Preview.cs | 10 + ...ameTest.unsigned short.Windows.Preview.xml | 17 + ...clarationTest.RemapTest.Unix.Compatible.cs | 30 + ...larationTest.RemapTest.Unix.Compatible.xml | 53 + ...mDeclarationTest.RemapTest.Unix.Default.cs | 30 + ...DeclarationTest.RemapTest.Unix.Default.xml | 53 + ...umDeclarationTest.RemapTest.Unix.Latest.cs | 30 + ...mDeclarationTest.RemapTest.Unix.Latest.xml | 53 + ...mDeclarationTest.RemapTest.Unix.Preview.cs | 30 + ...DeclarationTest.RemapTest.Unix.Preview.xml | 53 + ...rationTest.RemapTest.Windows.Compatible.cs | 30 + ...ationTest.RemapTest.Windows.Compatible.xml | 53 + ...clarationTest.RemapTest.Windows.Default.cs | 30 + ...larationTest.RemapTest.Windows.Default.xml | 53 + ...eclarationTest.RemapTest.Windows.Latest.cs | 30 + ...clarationTest.RemapTest.Windows.Latest.xml | 53 + ...clarationTest.RemapTest.Windows.Preview.cs | 30 + ...larationTest.RemapTest.Windows.Preview.xml | 53 + ...t.WithAnonymousEnumTest.Unix.Compatible.cs | 14 + ....WithAnonymousEnumTest.Unix.Compatible.xml | 22 + ...Test.WithAnonymousEnumTest.Unix.Default.cs | 14 + ...est.WithAnonymousEnumTest.Unix.Default.xml | 22 + ...nTest.WithAnonymousEnumTest.Unix.Latest.cs | 14 + ...Test.WithAnonymousEnumTest.Unix.Latest.xml | 22 + ...Test.WithAnonymousEnumTest.Unix.Preview.cs | 14 + ...est.WithAnonymousEnumTest.Unix.Preview.xml | 22 + ...ithAnonymousEnumTest.Windows.Compatible.cs | 14 + ...thAnonymousEnumTest.Windows.Compatible.xml | 22 + ...t.WithAnonymousEnumTest.Windows.Default.cs | 14 + ....WithAnonymousEnumTest.Windows.Default.xml | 22 + ...st.WithAnonymousEnumTest.Windows.Latest.cs | 14 + ...t.WithAnonymousEnumTest.Windows.Latest.xml | 22 + ...t.WithAnonymousEnumTest.Windows.Preview.cs | 14 + ....WithAnonymousEnumTest.Windows.Preview.xml | 22 + ...nTest.WithAttributeTest.Unix.Compatible.cs | 15 + ...Test.WithAttributeTest.Unix.Compatible.xml | 24 + ...tionTest.WithAttributeTest.Unix.Default.cs | 15 + ...ionTest.WithAttributeTest.Unix.Default.xml | 24 + ...ationTest.WithAttributeTest.Unix.Latest.cs | 15 + ...tionTest.WithAttributeTest.Unix.Latest.xml | 24 + ...tionTest.WithAttributeTest.Unix.Preview.cs | 15 + ...ionTest.WithAttributeTest.Unix.Preview.xml | 24 + ...st.WithAttributeTest.Windows.Compatible.cs | 15 + ...t.WithAttributeTest.Windows.Compatible.xml | 24 + ...nTest.WithAttributeTest.Windows.Default.cs | 15 + ...Test.WithAttributeTest.Windows.Default.xml | 24 + ...onTest.WithAttributeTest.Windows.Latest.cs | 15 + ...nTest.WithAttributeTest.Windows.Latest.xml | 24 + ...nTest.WithAttributeTest.Windows.Preview.cs | 15 + ...Test.WithAttributeTest.Windows.Preview.xml | 24 + ...Test.WithCastToEnumType.Unix.Compatible.cs | 9 + ...est.WithCastToEnumType.Unix.Compatible.xml | 26 + ...ionTest.WithCastToEnumType.Unix.Default.cs | 9 + ...onTest.WithCastToEnumType.Unix.Default.xml | 26 + ...tionTest.WithCastToEnumType.Unix.Latest.cs | 9 + ...ionTest.WithCastToEnumType.Unix.Latest.xml | 26 + ...ionTest.WithCastToEnumType.Unix.Preview.cs | 9 + ...onTest.WithCastToEnumType.Unix.Preview.xml | 26 + ...t.WithCastToEnumType.Windows.Compatible.cs | 9 + ....WithCastToEnumType.Windows.Compatible.xml | 26 + ...Test.WithCastToEnumType.Windows.Default.cs | 9 + ...est.WithCastToEnumType.Windows.Default.xml | 26 + ...nTest.WithCastToEnumType.Windows.Latest.cs | 9 + ...Test.WithCastToEnumType.Windows.Latest.xml | 26 + ...Test.WithCastToEnumType.Windows.Preview.cs | 9 + ...est.WithCastToEnumType.Windows.Preview.xml | 26 + ...t.WithMultipleEnumsTest.Unix.Compatible.cs | 15 + ....WithMultipleEnumsTest.Unix.Compatible.xml | 29 + ...Test.WithMultipleEnumsTest.Unix.Default.cs | 15 + ...est.WithMultipleEnumsTest.Unix.Default.xml | 29 + ...nTest.WithMultipleEnumsTest.Unix.Latest.cs | 15 + ...Test.WithMultipleEnumsTest.Unix.Latest.xml | 29 + ...Test.WithMultipleEnumsTest.Unix.Preview.cs | 15 + ...est.WithMultipleEnumsTest.Unix.Preview.xml | 29 + ...ithMultipleEnumsTest.Windows.Compatible.cs | 15 + ...thMultipleEnumsTest.Windows.Compatible.xml | 29 + ...t.WithMultipleEnumsTest.Windows.Default.cs | 15 + ....WithMultipleEnumsTest.Windows.Default.xml | 29 + ...st.WithMultipleEnumsTest.Windows.Latest.cs | 15 + ...t.WithMultipleEnumsTest.Windows.Latest.xml | 29 + ...t.WithMultipleEnumsTest.Windows.Preview.cs | 15 + ....WithMultipleEnumsTest.Windows.Preview.xml | 29 + ...thNamespaceStarPlusTest.Unix.Compatible.cs | 15 + ...hNamespaceStarPlusTest.Unix.Compatible.xml | 23 + ....WithNamespaceStarPlusTest.Unix.Default.cs | 15 + ...WithNamespaceStarPlusTest.Unix.Default.xml | 23 + ...t.WithNamespaceStarPlusTest.Unix.Latest.cs | 15 + ....WithNamespaceStarPlusTest.Unix.Latest.xml | 23 + ....WithNamespaceStarPlusTest.Unix.Preview.cs | 15 + ...WithNamespaceStarPlusTest.Unix.Preview.xml | 23 + ...amespaceStarPlusTest.Windows.Compatible.cs | 15 + ...mespaceStarPlusTest.Windows.Compatible.xml | 23 + ...thNamespaceStarPlusTest.Windows.Default.cs | 15 + ...hNamespaceStarPlusTest.Windows.Default.xml | 23 + ...ithNamespaceStarPlusTest.Windows.Latest.cs | 15 + ...thNamespaceStarPlusTest.Windows.Latest.xml | 23 + ...thNamespaceStarPlusTest.Windows.Preview.cs | 15 + ...hNamespaceStarPlusTest.Windows.Preview.xml | 23 + ...t.WithNamespaceStarTest.Unix.Compatible.cs | 14 + ....WithNamespaceStarTest.Unix.Compatible.xml | 23 + ...Test.WithNamespaceStarTest.Unix.Default.cs | 14 + ...est.WithNamespaceStarTest.Unix.Default.xml | 23 + ...nTest.WithNamespaceStarTest.Unix.Latest.cs | 14 + ...Test.WithNamespaceStarTest.Unix.Latest.xml | 23 + ...Test.WithNamespaceStarTest.Unix.Preview.cs | 14 + ...est.WithNamespaceStarTest.Unix.Preview.xml | 23 + ...ithNamespaceStarTest.Windows.Compatible.cs | 14 + ...thNamespaceStarTest.Windows.Compatible.xml | 23 + ...t.WithNamespaceStarTest.Windows.Default.cs | 14 + ....WithNamespaceStarTest.Windows.Default.xml | 23 + ...st.WithNamespaceStarTest.Windows.Latest.cs | 14 + ...t.WithNamespaceStarTest.Windows.Latest.xml | 23 + ...t.WithNamespaceStarTest.Windows.Preview.cs | 14 + ....WithNamespaceStarTest.Windows.Preview.xml | 23 + ...nTest.WithNamespaceTest.Unix.Compatible.cs | 14 + ...Test.WithNamespaceTest.Unix.Compatible.xml | 23 + ...tionTest.WithNamespaceTest.Unix.Default.cs | 14 + ...ionTest.WithNamespaceTest.Unix.Default.xml | 23 + ...ationTest.WithNamespaceTest.Unix.Latest.cs | 14 + ...tionTest.WithNamespaceTest.Unix.Latest.xml | 23 + ...tionTest.WithNamespaceTest.Unix.Preview.cs | 14 + ...ionTest.WithNamespaceTest.Unix.Preview.xml | 23 + ...st.WithNamespaceTest.Windows.Compatible.cs | 14 + ...t.WithNamespaceTest.Windows.Compatible.xml | 23 + ...nTest.WithNamespaceTest.Windows.Default.cs | 14 + ...Test.WithNamespaceTest.Windows.Default.xml | 23 + ...onTest.WithNamespaceTest.Windows.Latest.cs | 14 + ...nTest.WithNamespaceTest.Windows.Latest.xml | 23 + ...nTest.WithNamespaceTest.Windows.Preview.cs | 14 + ...Test.WithNamespaceTest.Windows.Preview.xml | 23 + ...ymousEnumEnumeratorTest.Unix.Compatible.cs | 10 + ...mousEnumEnumeratorTest.Unix.Compatible.xml | 19 + ...nonymousEnumEnumeratorTest.Unix.Default.cs | 10 + ...onymousEnumEnumeratorTest.Unix.Default.xml | 19 + ...AnonymousEnumEnumeratorTest.Unix.Latest.cs | 10 + ...nonymousEnumEnumeratorTest.Unix.Latest.xml | 19 + ...nonymousEnumEnumeratorTest.Unix.Preview.cs | 10 + ...onymousEnumEnumeratorTest.Unix.Preview.xml | 19 + ...usEnumEnumeratorTest.Windows.Compatible.cs | 10 + ...sEnumEnumeratorTest.Windows.Compatible.xml | 19 + ...ymousEnumEnumeratorTest.Windows.Default.cs | 10 + ...mousEnumEnumeratorTest.Windows.Default.xml | 19 + ...nymousEnumEnumeratorTest.Windows.Latest.cs | 10 + ...ymousEnumEnumeratorTest.Windows.Latest.xml | 19 + ...ymousEnumEnumeratorTest.Windows.Preview.cs | 10 + ...mousEnumEnumeratorTest.Windows.Preview.xml | 19 + ...peAndicitConversionTest.Unix.Compatible.cs | 10 + ...eAndicitConversionTest.Unix.Compatible.xml | 20 + ...hTypeAndicitConversionTest.Unix.Default.cs | 10 + ...TypeAndicitConversionTest.Unix.Default.xml | 20 + ...thTypeAndicitConversionTest.Unix.Latest.cs | 10 + ...hTypeAndicitConversionTest.Unix.Latest.xml | 20 + ...hTypeAndicitConversionTest.Unix.Preview.cs | 10 + ...TypeAndicitConversionTest.Unix.Preview.xml | 20 + ...ndicitConversionTest.Windows.Compatible.cs | 10 + ...dicitConversionTest.Windows.Compatible.xml | 20 + ...peAndicitConversionTest.Windows.Default.cs | 10 + ...eAndicitConversionTest.Windows.Default.xml | 20 + ...ypeAndicitConversionTest.Windows.Latest.cs | 10 + ...peAndicitConversionTest.Windows.Latest.xml | 20 + ...peAndicitConversionTest.Windows.Preview.cs | 10 + ...eAndicitConversionTest.Windows.Preview.xml | 20 + ...ithTypeStarOverrideTest.Unix.Compatible.cs | 13 + ...thTypeStarOverrideTest.Unix.Compatible.xml | 17 + ...t.WithTypeStarOverrideTest.Unix.Default.cs | 13 + ....WithTypeStarOverrideTest.Unix.Default.xml | 17 + ...st.WithTypeStarOverrideTest.Unix.Latest.cs | 13 + ...t.WithTypeStarOverrideTest.Unix.Latest.xml | 17 + ...t.WithTypeStarOverrideTest.Unix.Preview.cs | 13 + ....WithTypeStarOverrideTest.Unix.Preview.xml | 17 + ...TypeStarOverrideTest.Windows.Compatible.cs | 13 + ...ypeStarOverrideTest.Windows.Compatible.xml | 17 + ...ithTypeStarOverrideTest.Windows.Default.cs | 13 + ...thTypeStarOverrideTest.Windows.Default.xml | 17 + ...WithTypeStarOverrideTest.Windows.Latest.cs | 13 + ...ithTypeStarOverrideTest.Windows.Latest.xml | 17 + ...ithTypeStarOverrideTest.Windows.Preview.cs | 13 + ...thTypeStarOverrideTest.Windows.Preview.xml | 17 + ...onTest.WithTypeStarTest.Unix.Compatible.cs | 14 + ...nTest.WithTypeStarTest.Unix.Compatible.xml | 17 + ...ationTest.WithTypeStarTest.Unix.Default.cs | 14 + ...tionTest.WithTypeStarTest.Unix.Default.xml | 17 + ...rationTest.WithTypeStarTest.Unix.Latest.cs | 14 + ...ationTest.WithTypeStarTest.Unix.Latest.xml | 17 + ...ationTest.WithTypeStarTest.Unix.Preview.cs | 14 + ...tionTest.WithTypeStarTest.Unix.Preview.xml | 17 + ...est.WithTypeStarTest.Windows.Compatible.cs | 14 + ...st.WithTypeStarTest.Windows.Compatible.xml | 17 + ...onTest.WithTypeStarTest.Windows.Default.cs | 14 + ...nTest.WithTypeStarTest.Windows.Default.xml | 17 + ...ionTest.WithTypeStarTest.Windows.Latest.cs | 14 + ...onTest.WithTypeStarTest.Windows.Latest.xml | 17 + ...onTest.WithTypeStarTest.Windows.Preview.cs | 14 + ...nTest.WithTypeStarTest.Windows.Preview.xml | 17 + ...rationTest.WithTypeTest.Unix.Compatible.cs | 10 + ...ationTest.WithTypeTest.Unix.Compatible.xml | 17 + ...clarationTest.WithTypeTest.Unix.Default.cs | 10 + ...larationTest.WithTypeTest.Unix.Default.xml | 17 + ...eclarationTest.WithTypeTest.Unix.Latest.cs | 10 + ...clarationTest.WithTypeTest.Unix.Latest.xml | 17 + ...clarationTest.WithTypeTest.Unix.Preview.cs | 10 + ...larationTest.WithTypeTest.Unix.Preview.xml | 17 + ...ionTest.WithTypeTest.Windows.Compatible.cs | 10 + ...onTest.WithTypeTest.Windows.Compatible.xml | 17 + ...rationTest.WithTypeTest.Windows.Default.cs | 10 + ...ationTest.WithTypeTest.Windows.Default.xml | 17 + ...arationTest.WithTypeTest.Windows.Latest.cs | 10 + ...rationTest.WithTypeTest.Windows.Latest.xml | 17 + ...rationTest.WithTypeTest.Windows.Preview.cs | 10 + ...ationTest.WithTypeTest.Windows.Preview.xml | 17 + ....WithicitConversionTest.Unix.Compatible.cs | 9 + ...WithicitConversionTest.Unix.Compatible.xml | 27 + ...est.WithicitConversionTest.Unix.Default.cs | 9 + ...st.WithicitConversionTest.Unix.Default.xml | 27 + ...Test.WithicitConversionTest.Unix.Latest.cs | 9 + ...est.WithicitConversionTest.Unix.Latest.xml | 27 + ...est.WithicitConversionTest.Unix.Preview.cs | 9 + ...st.WithicitConversionTest.Unix.Preview.xml | 27 + ...thicitConversionTest.Windows.Compatible.cs | 9 + ...hicitConversionTest.Windows.Compatible.xml | 27 + ....WithicitConversionTest.Windows.Default.cs | 9 + ...WithicitConversionTest.Windows.Default.xml | 27 + ...t.WithicitConversionTest.Windows.Latest.cs | 9 + ....WithicitConversionTest.Windows.Latest.xml | 27 + ....WithicitConversionTest.Windows.Preview.cs | 9 + ...WithicitConversionTest.Windows.Preview.xml | 27 + ...t.AccessUnionMemberTest.Unix.Compatible.cs | 38 + ....AccessUnionMemberTest.Unix.Compatible.xml | 32 + ...Test.AccessUnionMemberTest.Unix.Default.cs | 35 + ...est.AccessUnionMemberTest.Unix.Default.xml | 29 + ...tTest.AccessUnionMemberTest.Unix.Latest.cs | 37 + ...Test.AccessUnionMemberTest.Unix.Latest.xml | 29 + ...Test.AccessUnionMemberTest.Unix.Preview.cs | 37 + ...est.AccessUnionMemberTest.Unix.Preview.xml | 29 + ...ccessUnionMemberTest.Windows.Compatible.cs | 38 + ...cessUnionMemberTest.Windows.Compatible.xml | 32 + ...t.AccessUnionMemberTest.Windows.Default.cs | 35 + ....AccessUnionMemberTest.Windows.Default.xml | 29 + ...st.AccessUnionMemberTest.Windows.Latest.cs | 37 + ...t.AccessUnionMemberTest.Windows.Latest.xml | 29 + ...t.AccessUnionMemberTest.Windows.Preview.cs | 37 + ....AccessUnionMemberTest.Windows.Preview.xml | 29 + ...Test.ArraySubscriptTest.Unix.Compatible.cs | 10 + ...est.ArraySubscriptTest.Unix.Compatible.xml | 17 + ...ortTest.ArraySubscriptTest.Unix.Default.cs | 10 + ...rtTest.ArraySubscriptTest.Unix.Default.xml | 17 + ...portTest.ArraySubscriptTest.Unix.Latest.cs | 10 + ...ortTest.ArraySubscriptTest.Unix.Latest.xml | 17 + ...ortTest.ArraySubscriptTest.Unix.Preview.cs | 10 + ...rtTest.ArraySubscriptTest.Unix.Preview.xml | 17 + ...t.ArraySubscriptTest.Windows.Compatible.cs | 10 + ....ArraySubscriptTest.Windows.Compatible.xml | 17 + ...Test.ArraySubscriptTest.Windows.Default.cs | 10 + ...est.ArraySubscriptTest.Windows.Default.xml | 17 + ...tTest.ArraySubscriptTest.Windows.Latest.cs | 10 + ...Test.ArraySubscriptTest.Windows.Latest.xml | 17 + ...Test.ArraySubscriptTest.Windows.Preview.cs | 10 + ...est.ArraySubscriptTest.Windows.Preview.xml | 17 + ...odyImportTest.BasicTest.Unix.Compatible.cs | 9 + ...dyImportTest.BasicTest.Unix.Compatible.xml | 11 + ...onBodyImportTest.BasicTest.Unix.Default.cs | 9 + ...nBodyImportTest.BasicTest.Unix.Default.xml | 11 + ...ionBodyImportTest.BasicTest.Unix.Latest.cs | 9 + ...onBodyImportTest.BasicTest.Unix.Latest.xml | 11 + ...onBodyImportTest.BasicTest.Unix.Preview.cs | 9 + ...nBodyImportTest.BasicTest.Unix.Preview.xml | 11 + ...ImportTest.BasicTest.Windows.Compatible.cs | 9 + ...mportTest.BasicTest.Windows.Compatible.xml | 11 + ...odyImportTest.BasicTest.Windows.Default.cs | 9 + ...dyImportTest.BasicTest.Windows.Default.xml | 11 + ...BodyImportTest.BasicTest.Windows.Latest.cs | 9 + ...odyImportTest.BasicTest.Windows.Latest.xml | 11 + ...odyImportTest.BasicTest.Windows.Preview.cs | 9 + ...dyImportTest.BasicTest.Windows.Preview.xml | 11 + ...naryOperatorBasicTest.%.Unix.Compatible.cs | 10 + ...aryOperatorBasicTest.%.Unix.Compatible.xml | 17 + ....BinaryOperatorBasicTest.%.Unix.Default.cs | 10 + ...BinaryOperatorBasicTest.%.Unix.Default.xml | 17 + ...t.BinaryOperatorBasicTest.%.Unix.Latest.cs | 10 + ....BinaryOperatorBasicTest.%.Unix.Latest.xml | 17 + ....BinaryOperatorBasicTest.%.Unix.Preview.cs | 10 + ...BinaryOperatorBasicTest.%.Unix.Preview.xml | 17 + ...yOperatorBasicTest.%.Windows.Compatible.cs | 10 + ...OperatorBasicTest.%.Windows.Compatible.xml | 17 + ...naryOperatorBasicTest.%.Windows.Default.cs | 10 + ...aryOperatorBasicTest.%.Windows.Default.xml | 17 + ...inaryOperatorBasicTest.%.Windows.Latest.cs | 10 + ...naryOperatorBasicTest.%.Windows.Latest.xml | 17 + ...naryOperatorBasicTest.%.Windows.Preview.cs | 10 + ...aryOperatorBasicTest.%.Windows.Preview.xml | 17 + ...aryOperatorBasicTest.%=.Unix.Compatible.cs | 10 + ...ryOperatorBasicTest.%=.Unix.Compatible.xml | 17 + ...BinaryOperatorBasicTest.%=.Unix.Default.cs | 10 + ...inaryOperatorBasicTest.%=.Unix.Default.xml | 17 + ....BinaryOperatorBasicTest.%=.Unix.Latest.cs | 10 + ...BinaryOperatorBasicTest.%=.Unix.Latest.xml | 17 + ...BinaryOperatorBasicTest.%=.Unix.Preview.cs | 10 + ...inaryOperatorBasicTest.%=.Unix.Preview.xml | 17 + ...OperatorBasicTest.%=.Windows.Compatible.cs | 10 + ...peratorBasicTest.%=.Windows.Compatible.xml | 17 + ...aryOperatorBasicTest.%=.Windows.Default.cs | 10 + ...ryOperatorBasicTest.%=.Windows.Default.xml | 17 + ...naryOperatorBasicTest.%=.Windows.Latest.cs | 10 + ...aryOperatorBasicTest.%=.Windows.Latest.xml | 17 + ...aryOperatorBasicTest.%=.Windows.Preview.cs | 10 + ...ryOperatorBasicTest.%=.Windows.Preview.xml | 17 + ...naryOperatorBasicTest.&.Unix.Compatible.cs | 10 + ...aryOperatorBasicTest.&.Unix.Compatible.xml | 17 + ....BinaryOperatorBasicTest.&.Unix.Default.cs | 10 + ...BinaryOperatorBasicTest.&.Unix.Default.xml | 17 + ...t.BinaryOperatorBasicTest.&.Unix.Latest.cs | 10 + ....BinaryOperatorBasicTest.&.Unix.Latest.xml | 17 + ....BinaryOperatorBasicTest.&.Unix.Preview.cs | 10 + ...BinaryOperatorBasicTest.&.Unix.Preview.xml | 17 + ...yOperatorBasicTest.&.Windows.Compatible.cs | 10 + ...OperatorBasicTest.&.Windows.Compatible.xml | 17 + ...naryOperatorBasicTest.&.Windows.Default.cs | 10 + ...aryOperatorBasicTest.&.Windows.Default.xml | 17 + ...inaryOperatorBasicTest.&.Windows.Latest.cs | 10 + ...naryOperatorBasicTest.&.Windows.Latest.xml | 17 + ...naryOperatorBasicTest.&.Windows.Preview.cs | 10 + ...aryOperatorBasicTest.&.Windows.Preview.xml | 17 + ...aryOperatorBasicTest.&=.Unix.Compatible.cs | 10 + ...ryOperatorBasicTest.&=.Unix.Compatible.xml | 17 + ...BinaryOperatorBasicTest.&=.Unix.Default.cs | 10 + ...inaryOperatorBasicTest.&=.Unix.Default.xml | 17 + ....BinaryOperatorBasicTest.&=.Unix.Latest.cs | 10 + ...BinaryOperatorBasicTest.&=.Unix.Latest.xml | 17 + ...BinaryOperatorBasicTest.&=.Unix.Preview.cs | 10 + ...inaryOperatorBasicTest.&=.Unix.Preview.xml | 17 + ...OperatorBasicTest.&=.Windows.Compatible.cs | 10 + ...peratorBasicTest.&=.Windows.Compatible.xml | 17 + ...aryOperatorBasicTest.&=.Windows.Default.cs | 10 + ...ryOperatorBasicTest.&=.Windows.Default.xml | 17 + ...naryOperatorBasicTest.&=.Windows.Latest.cs | 10 + ...aryOperatorBasicTest.&=.Windows.Latest.xml | 17 + ...aryOperatorBasicTest.&=.Windows.Preview.cs | 10 + ...ryOperatorBasicTest.&=.Windows.Preview.xml | 17 + ...naryOperatorBasicTest.+.Unix.Compatible.cs | 10 + ...aryOperatorBasicTest.+.Unix.Compatible.xml | 17 + ....BinaryOperatorBasicTest.+.Unix.Default.cs | 10 + ...BinaryOperatorBasicTest.+.Unix.Default.xml | 17 + ...t.BinaryOperatorBasicTest.+.Unix.Latest.cs | 10 + ....BinaryOperatorBasicTest.+.Unix.Latest.xml | 17 + ....BinaryOperatorBasicTest.+.Unix.Preview.cs | 10 + ...BinaryOperatorBasicTest.+.Unix.Preview.xml | 17 + ...yOperatorBasicTest.+.Windows.Compatible.cs | 10 + ...OperatorBasicTest.+.Windows.Compatible.xml | 17 + ...naryOperatorBasicTest.+.Windows.Default.cs | 10 + ...aryOperatorBasicTest.+.Windows.Default.xml | 17 + ...inaryOperatorBasicTest.+.Windows.Latest.cs | 10 + ...naryOperatorBasicTest.+.Windows.Latest.xml | 17 + ...naryOperatorBasicTest.+.Windows.Preview.cs | 10 + ...aryOperatorBasicTest.+.Windows.Preview.xml | 17 + ...aryOperatorBasicTest.+=.Unix.Compatible.cs | 10 + ...ryOperatorBasicTest.+=.Unix.Compatible.xml | 17 + ...BinaryOperatorBasicTest.+=.Unix.Default.cs | 10 + ...inaryOperatorBasicTest.+=.Unix.Default.xml | 17 + ....BinaryOperatorBasicTest.+=.Unix.Latest.cs | 10 + ...BinaryOperatorBasicTest.+=.Unix.Latest.xml | 17 + ...BinaryOperatorBasicTest.+=.Unix.Preview.cs | 10 + ...inaryOperatorBasicTest.+=.Unix.Preview.xml | 17 + ...OperatorBasicTest.+=.Windows.Compatible.cs | 10 + ...peratorBasicTest.+=.Windows.Compatible.xml | 17 + ...aryOperatorBasicTest.+=.Windows.Default.cs | 10 + ...ryOperatorBasicTest.+=.Windows.Default.xml | 17 + ...naryOperatorBasicTest.+=.Windows.Latest.cs | 10 + ...aryOperatorBasicTest.+=.Windows.Latest.xml | 17 + ...aryOperatorBasicTest.+=.Windows.Preview.cs | 10 + ...ryOperatorBasicTest.+=.Windows.Preview.xml | 17 + ...naryOperatorBasicTest.-.Unix.Compatible.cs | 10 + ...aryOperatorBasicTest.-.Unix.Compatible.xml | 17 + ....BinaryOperatorBasicTest.-.Unix.Default.cs | 10 + ...BinaryOperatorBasicTest.-.Unix.Default.xml | 17 + ...t.BinaryOperatorBasicTest.-.Unix.Latest.cs | 10 + ....BinaryOperatorBasicTest.-.Unix.Latest.xml | 17 + ....BinaryOperatorBasicTest.-.Unix.Preview.cs | 10 + ...BinaryOperatorBasicTest.-.Unix.Preview.xml | 17 + ...yOperatorBasicTest.-.Windows.Compatible.cs | 10 + ...OperatorBasicTest.-.Windows.Compatible.xml | 17 + ...naryOperatorBasicTest.-.Windows.Default.cs | 10 + ...aryOperatorBasicTest.-.Windows.Default.xml | 17 + ...inaryOperatorBasicTest.-.Windows.Latest.cs | 10 + ...naryOperatorBasicTest.-.Windows.Latest.xml | 17 + ...naryOperatorBasicTest.-.Windows.Preview.cs | 10 + ...aryOperatorBasicTest.-.Windows.Preview.xml | 17 + ...aryOperatorBasicTest.-=.Unix.Compatible.cs | 10 + ...ryOperatorBasicTest.-=.Unix.Compatible.xml | 17 + ...BinaryOperatorBasicTest.-=.Unix.Default.cs | 10 + ...inaryOperatorBasicTest.-=.Unix.Default.xml | 17 + ....BinaryOperatorBasicTest.-=.Unix.Latest.cs | 10 + ...BinaryOperatorBasicTest.-=.Unix.Latest.xml | 17 + ...BinaryOperatorBasicTest.-=.Unix.Preview.cs | 10 + ...inaryOperatorBasicTest.-=.Unix.Preview.xml | 17 + ...OperatorBasicTest.-=.Windows.Compatible.cs | 10 + ...peratorBasicTest.-=.Windows.Compatible.xml | 17 + ...aryOperatorBasicTest.-=.Windows.Default.cs | 10 + ...ryOperatorBasicTest.-=.Windows.Default.xml | 17 + ...naryOperatorBasicTest.-=.Windows.Latest.cs | 10 + ...aryOperatorBasicTest.-=.Windows.Latest.xml | 17 + ...aryOperatorBasicTest.-=.Windows.Preview.cs | 10 + ...ryOperatorBasicTest.-=.Windows.Preview.xml | 17 + ...naryOperatorBasicTest.=.Unix.Compatible.cs | 10 + ...aryOperatorBasicTest.=.Unix.Compatible.xml | 17 + ....BinaryOperatorBasicTest.=.Unix.Default.cs | 10 + ...BinaryOperatorBasicTest.=.Unix.Default.xml | 17 + ...t.BinaryOperatorBasicTest.=.Unix.Latest.cs | 10 + ....BinaryOperatorBasicTest.=.Unix.Latest.xml | 17 + ....BinaryOperatorBasicTest.=.Unix.Preview.cs | 10 + ...BinaryOperatorBasicTest.=.Unix.Preview.xml | 17 + ...yOperatorBasicTest.=.Windows.Compatible.cs | 10 + ...OperatorBasicTest.=.Windows.Compatible.xml | 17 + ...naryOperatorBasicTest.=.Windows.Default.cs | 10 + ...aryOperatorBasicTest.=.Windows.Default.xml | 17 + ...inaryOperatorBasicTest.=.Windows.Latest.cs | 10 + ...naryOperatorBasicTest.=.Windows.Latest.xml | 17 + ...naryOperatorBasicTest.=.Windows.Preview.cs | 10 + ...aryOperatorBasicTest.=.Windows.Preview.xml | 17 + ...naryOperatorBasicTest.^.Unix.Compatible.cs | 10 + ...aryOperatorBasicTest.^.Unix.Compatible.xml | 17 + ....BinaryOperatorBasicTest.^.Unix.Default.cs | 10 + ...BinaryOperatorBasicTest.^.Unix.Default.xml | 17 + ...t.BinaryOperatorBasicTest.^.Unix.Latest.cs | 10 + ....BinaryOperatorBasicTest.^.Unix.Latest.xml | 17 + ....BinaryOperatorBasicTest.^.Unix.Preview.cs | 10 + ...BinaryOperatorBasicTest.^.Unix.Preview.xml | 17 + ...yOperatorBasicTest.^.Windows.Compatible.cs | 10 + ...OperatorBasicTest.^.Windows.Compatible.xml | 17 + ...naryOperatorBasicTest.^.Windows.Default.cs | 10 + ...aryOperatorBasicTest.^.Windows.Default.xml | 17 + ...inaryOperatorBasicTest.^.Windows.Latest.cs | 10 + ...naryOperatorBasicTest.^.Windows.Latest.xml | 17 + ...naryOperatorBasicTest.^.Windows.Preview.cs | 10 + ...aryOperatorBasicTest.^.Windows.Preview.xml | 17 + ...aryOperatorBasicTest.^=.Unix.Compatible.cs | 10 + ...ryOperatorBasicTest.^=.Unix.Compatible.xml | 17 + ...BinaryOperatorBasicTest.^=.Unix.Default.cs | 10 + ...inaryOperatorBasicTest.^=.Unix.Default.xml | 17 + ....BinaryOperatorBasicTest.^=.Unix.Latest.cs | 10 + ...BinaryOperatorBasicTest.^=.Unix.Latest.xml | 17 + ...BinaryOperatorBasicTest.^=.Unix.Preview.cs | 10 + ...inaryOperatorBasicTest.^=.Unix.Preview.xml | 17 + ...OperatorBasicTest.^=.Windows.Compatible.cs | 10 + ...peratorBasicTest.^=.Windows.Compatible.xml | 17 + ...aryOperatorBasicTest.^=.Windows.Default.cs | 10 + ...ryOperatorBasicTest.^=.Windows.Default.xml | 17 + ...naryOperatorBasicTest.^=.Windows.Latest.cs | 10 + ...aryOperatorBasicTest.^=.Windows.Latest.xml | 17 + ...aryOperatorBasicTest.^=.Windows.Preview.cs | 10 + ...ryOperatorBasicTest.^=.Windows.Preview.xml | 17 + ...OperatorBasicTest.__ast.Unix.Compatible.cs | 10 + ...peratorBasicTest.__ast.Unix.Compatible.xml | 17 + ...aryOperatorBasicTest.__ast.Unix.Default.cs | 10 + ...ryOperatorBasicTest.__ast.Unix.Default.xml | 17 + ...naryOperatorBasicTest.__ast.Unix.Latest.cs | 10 + ...aryOperatorBasicTest.__ast.Unix.Latest.xml | 17 + ...aryOperatorBasicTest.__ast.Unix.Preview.cs | 10 + ...ryOperatorBasicTest.__ast.Unix.Preview.xml | 17 + ...ratorBasicTest.__ast.Windows.Compatible.cs | 10 + ...atorBasicTest.__ast.Windows.Compatible.xml | 17 + ...OperatorBasicTest.__ast.Windows.Default.cs | 10 + ...peratorBasicTest.__ast.Windows.Default.xml | 17 + ...yOperatorBasicTest.__ast.Windows.Latest.cs | 10 + ...OperatorBasicTest.__ast.Windows.Latest.xml | 17 + ...OperatorBasicTest.__ast.Windows.Preview.cs | 10 + ...peratorBasicTest.__ast.Windows.Preview.xml | 17 + ...peratorBasicTest.__ast=.Unix.Compatible.cs | 10 + ...eratorBasicTest.__ast=.Unix.Compatible.xml | 17 + ...ryOperatorBasicTest.__ast=.Unix.Default.cs | 10 + ...yOperatorBasicTest.__ast=.Unix.Default.xml | 17 + ...aryOperatorBasicTest.__ast=.Unix.Latest.cs | 10 + ...ryOperatorBasicTest.__ast=.Unix.Latest.xml | 17 + ...ryOperatorBasicTest.__ast=.Unix.Preview.cs | 10 + ...yOperatorBasicTest.__ast=.Unix.Preview.xml | 17 + ...atorBasicTest.__ast=.Windows.Compatible.cs | 10 + ...torBasicTest.__ast=.Windows.Compatible.xml | 17 + ...peratorBasicTest.__ast=.Windows.Default.cs | 10 + ...eratorBasicTest.__ast=.Windows.Default.xml | 17 + ...OperatorBasicTest.__ast=.Windows.Latest.cs | 10 + ...peratorBasicTest.__ast=.Windows.Latest.xml | 17 + ...peratorBasicTest.__ast=.Windows.Preview.cs | 10 + ...eratorBasicTest.__ast=.Windows.Preview.xml | 17 + ...yOperatorBasicTest.__fs.Unix.Compatible.cs | 10 + ...OperatorBasicTest.__fs.Unix.Compatible.xml | 17 + ...naryOperatorBasicTest.__fs.Unix.Default.cs | 10 + ...aryOperatorBasicTest.__fs.Unix.Default.xml | 17 + ...inaryOperatorBasicTest.__fs.Unix.Latest.cs | 10 + ...naryOperatorBasicTest.__fs.Unix.Latest.xml | 17 + ...naryOperatorBasicTest.__fs.Unix.Preview.cs | 10 + ...aryOperatorBasicTest.__fs.Unix.Preview.xml | 17 + ...eratorBasicTest.__fs.Windows.Compatible.cs | 10 + ...ratorBasicTest.__fs.Windows.Compatible.xml | 17 + ...yOperatorBasicTest.__fs.Windows.Default.cs | 10 + ...OperatorBasicTest.__fs.Windows.Default.xml | 17 + ...ryOperatorBasicTest.__fs.Windows.Latest.cs | 10 + ...yOperatorBasicTest.__fs.Windows.Latest.xml | 17 + ...yOperatorBasicTest.__fs.Windows.Preview.cs | 10 + ...OperatorBasicTest.__fs.Windows.Preview.xml | 17 + ...OperatorBasicTest.__fs=.Unix.Compatible.cs | 10 + ...peratorBasicTest.__fs=.Unix.Compatible.xml | 17 + ...aryOperatorBasicTest.__fs=.Unix.Default.cs | 10 + ...ryOperatorBasicTest.__fs=.Unix.Default.xml | 17 + ...naryOperatorBasicTest.__fs=.Unix.Latest.cs | 10 + ...aryOperatorBasicTest.__fs=.Unix.Latest.xml | 17 + ...aryOperatorBasicTest.__fs=.Unix.Preview.cs | 10 + ...ryOperatorBasicTest.__fs=.Unix.Preview.xml | 17 + ...ratorBasicTest.__fs=.Windows.Compatible.cs | 10 + ...atorBasicTest.__fs=.Windows.Compatible.xml | 17 + ...OperatorBasicTest.__fs=.Windows.Default.cs | 10 + ...peratorBasicTest.__fs=.Windows.Default.xml | 17 + ...yOperatorBasicTest.__fs=.Windows.Latest.cs | 10 + ...OperatorBasicTest.__fs=.Windows.Latest.xml | 17 + ...OperatorBasicTest.__fs=.Windows.Preview.cs | 10 + ...peratorBasicTest.__fs=.Windows.Preview.xml | 17 + ...ratorBasicTest.__gt__gt.Unix.Compatible.cs | 10 + ...atorBasicTest.__gt__gt.Unix.Compatible.xml | 17 + ...OperatorBasicTest.__gt__gt.Unix.Default.cs | 10 + ...peratorBasicTest.__gt__gt.Unix.Default.xml | 17 + ...yOperatorBasicTest.__gt__gt.Unix.Latest.cs | 10 + ...OperatorBasicTest.__gt__gt.Unix.Latest.xml | 17 + ...OperatorBasicTest.__gt__gt.Unix.Preview.cs | 10 + ...peratorBasicTest.__gt__gt.Unix.Preview.xml | 17 + ...orBasicTest.__gt__gt.Windows.Compatible.cs | 10 + ...rBasicTest.__gt__gt.Windows.Compatible.xml | 17 + ...ratorBasicTest.__gt__gt.Windows.Default.cs | 10 + ...atorBasicTest.__gt__gt.Windows.Default.xml | 17 + ...eratorBasicTest.__gt__gt.Windows.Latest.cs | 10 + ...ratorBasicTest.__gt__gt.Windows.Latest.xml | 17 + ...ratorBasicTest.__gt__gt.Windows.Preview.cs | 10 + ...atorBasicTest.__gt__gt.Windows.Preview.xml | 17 + ...atorBasicTest.__gt__gt=.Unix.Compatible.cs | 10 + ...torBasicTest.__gt__gt=.Unix.Compatible.xml | 17 + ...peratorBasicTest.__gt__gt=.Unix.Default.cs | 10 + ...eratorBasicTest.__gt__gt=.Unix.Default.xml | 17 + ...OperatorBasicTest.__gt__gt=.Unix.Latest.cs | 10 + ...peratorBasicTest.__gt__gt=.Unix.Latest.xml | 17 + ...peratorBasicTest.__gt__gt=.Unix.Preview.cs | 10 + ...eratorBasicTest.__gt__gt=.Unix.Preview.xml | 17 + ...rBasicTest.__gt__gt=.Windows.Compatible.cs | 10 + ...BasicTest.__gt__gt=.Windows.Compatible.xml | 17 + ...atorBasicTest.__gt__gt=.Windows.Default.cs | 10 + ...torBasicTest.__gt__gt=.Windows.Default.xml | 17 + ...ratorBasicTest.__gt__gt=.Windows.Latest.cs | 10 + ...atorBasicTest.__gt__gt=.Windows.Latest.xml | 17 + ...atorBasicTest.__gt__gt=.Windows.Preview.cs | 10 + ...torBasicTest.__gt__gt=.Windows.Preview.xml | 17 + ...ratorBasicTest.__lt__lt.Unix.Compatible.cs | 10 + ...atorBasicTest.__lt__lt.Unix.Compatible.xml | 17 + ...OperatorBasicTest.__lt__lt.Unix.Default.cs | 10 + ...peratorBasicTest.__lt__lt.Unix.Default.xml | 17 + ...yOperatorBasicTest.__lt__lt.Unix.Latest.cs | 10 + ...OperatorBasicTest.__lt__lt.Unix.Latest.xml | 17 + ...OperatorBasicTest.__lt__lt.Unix.Preview.cs | 10 + ...peratorBasicTest.__lt__lt.Unix.Preview.xml | 17 + ...orBasicTest.__lt__lt.Windows.Compatible.cs | 10 + ...rBasicTest.__lt__lt.Windows.Compatible.xml | 17 + ...ratorBasicTest.__lt__lt.Windows.Default.cs | 10 + ...atorBasicTest.__lt__lt.Windows.Default.xml | 17 + ...eratorBasicTest.__lt__lt.Windows.Latest.cs | 10 + ...ratorBasicTest.__lt__lt.Windows.Latest.xml | 17 + ...ratorBasicTest.__lt__lt.Windows.Preview.cs | 10 + ...atorBasicTest.__lt__lt.Windows.Preview.xml | 17 + ...atorBasicTest.__lt__lt=.Unix.Compatible.cs | 10 + ...torBasicTest.__lt__lt=.Unix.Compatible.xml | 17 + ...peratorBasicTest.__lt__lt=.Unix.Default.cs | 10 + ...eratorBasicTest.__lt__lt=.Unix.Default.xml | 17 + ...OperatorBasicTest.__lt__lt=.Unix.Latest.cs | 10 + ...peratorBasicTest.__lt__lt=.Unix.Latest.xml | 17 + ...peratorBasicTest.__lt__lt=.Unix.Preview.cs | 10 + ...eratorBasicTest.__lt__lt=.Unix.Preview.xml | 17 + ...rBasicTest.__lt__lt=.Windows.Compatible.cs | 10 + ...BasicTest.__lt__lt=.Windows.Compatible.xml | 17 + ...atorBasicTest.__lt__lt=.Windows.Default.cs | 10 + ...torBasicTest.__lt__lt=.Windows.Default.xml | 17 + ...ratorBasicTest.__lt__lt=.Windows.Latest.cs | 10 + ...atorBasicTest.__lt__lt=.Windows.Latest.xml | 17 + ...atorBasicTest.__lt__lt=.Windows.Preview.cs | 10 + ...torBasicTest.__lt__lt=.Windows.Preview.xml | 17 + ...yOperatorBasicTest.__vl.Unix.Compatible.cs | 10 + ...OperatorBasicTest.__vl.Unix.Compatible.xml | 17 + ...naryOperatorBasicTest.__vl.Unix.Default.cs | 10 + ...aryOperatorBasicTest.__vl.Unix.Default.xml | 17 + ...inaryOperatorBasicTest.__vl.Unix.Latest.cs | 10 + ...naryOperatorBasicTest.__vl.Unix.Latest.xml | 17 + ...naryOperatorBasicTest.__vl.Unix.Preview.cs | 10 + ...aryOperatorBasicTest.__vl.Unix.Preview.xml | 17 + ...eratorBasicTest.__vl.Windows.Compatible.cs | 10 + ...ratorBasicTest.__vl.Windows.Compatible.xml | 17 + ...yOperatorBasicTest.__vl.Windows.Default.cs | 10 + ...OperatorBasicTest.__vl.Windows.Default.xml | 17 + ...ryOperatorBasicTest.__vl.Windows.Latest.cs | 10 + ...yOperatorBasicTest.__vl.Windows.Latest.xml | 17 + ...yOperatorBasicTest.__vl.Windows.Preview.cs | 10 + ...OperatorBasicTest.__vl.Windows.Preview.xml | 17 + ...OperatorBasicTest.__vl=.Unix.Compatible.cs | 10 + ...peratorBasicTest.__vl=.Unix.Compatible.xml | 17 + ...aryOperatorBasicTest.__vl=.Unix.Default.cs | 10 + ...ryOperatorBasicTest.__vl=.Unix.Default.xml | 17 + ...naryOperatorBasicTest.__vl=.Unix.Latest.cs | 10 + ...aryOperatorBasicTest.__vl=.Unix.Latest.xml | 17 + ...aryOperatorBasicTest.__vl=.Unix.Preview.cs | 10 + ...ryOperatorBasicTest.__vl=.Unix.Preview.xml | 17 + ...ratorBasicTest.__vl=.Windows.Compatible.cs | 10 + ...atorBasicTest.__vl=.Windows.Compatible.xml | 17 + ...OperatorBasicTest.__vl=.Windows.Default.cs | 10 + ...peratorBasicTest.__vl=.Windows.Default.xml | 17 + ...yOperatorBasicTest.__vl=.Windows.Latest.cs | 10 + ...OperatorBasicTest.__vl=.Windows.Latest.xml | 17 + ...OperatorBasicTest.__vl=.Windows.Preview.cs | 10 + ...peratorBasicTest.__vl=.Windows.Preview.xml | 17 + ...yOperatorBooleanTest.&&.Unix.Compatible.cs | 10 + ...OperatorBooleanTest.&&.Unix.Compatible.xml | 17 + ...naryOperatorBooleanTest.&&.Unix.Default.cs | 10 + ...aryOperatorBooleanTest.&&.Unix.Default.xml | 17 + ...inaryOperatorBooleanTest.&&.Unix.Latest.cs | 10 + ...naryOperatorBooleanTest.&&.Unix.Latest.xml | 17 + ...naryOperatorBooleanTest.&&.Unix.Preview.cs | 10 + ...aryOperatorBooleanTest.&&.Unix.Preview.xml | 17 + ...eratorBooleanTest.&&.Windows.Compatible.cs | 10 + ...ratorBooleanTest.&&.Windows.Compatible.xml | 17 + ...yOperatorBooleanTest.&&.Windows.Default.cs | 10 + ...OperatorBooleanTest.&&.Windows.Default.xml | 17 + ...ryOperatorBooleanTest.&&.Windows.Latest.cs | 10 + ...yOperatorBooleanTest.&&.Windows.Latest.xml | 17 + ...yOperatorBooleanTest.&&.Windows.Preview.cs | 10 + ...OperatorBooleanTest.&&.Windows.Preview.xml | 17 + ...torBooleanTest.__vl__vl.Unix.Compatible.cs | 10 + ...orBooleanTest.__vl__vl.Unix.Compatible.xml | 17 + ...eratorBooleanTest.__vl__vl.Unix.Default.cs | 10 + ...ratorBooleanTest.__vl__vl.Unix.Default.xml | 17 + ...peratorBooleanTest.__vl__vl.Unix.Latest.cs | 10 + ...eratorBooleanTest.__vl__vl.Unix.Latest.xml | 17 + ...eratorBooleanTest.__vl__vl.Unix.Preview.cs | 10 + ...ratorBooleanTest.__vl__vl.Unix.Preview.xml | 17 + ...BooleanTest.__vl__vl.Windows.Compatible.cs | 10 + ...ooleanTest.__vl__vl.Windows.Compatible.xml | 17 + ...torBooleanTest.__vl__vl.Windows.Default.cs | 10 + ...orBooleanTest.__vl__vl.Windows.Default.xml | 17 + ...atorBooleanTest.__vl__vl.Windows.Latest.cs | 10 + ...torBooleanTest.__vl__vl.Windows.Latest.xml | 17 + ...torBooleanTest.__vl__vl.Windows.Preview.cs | 10 + ...orBooleanTest.__vl__vl.Windows.Preview.xml | 17 + ...yOperatorCompareTest.!=.Unix.Compatible.cs | 10 + ...OperatorCompareTest.!=.Unix.Compatible.xml | 17 + ...naryOperatorCompareTest.!=.Unix.Default.cs | 10 + ...aryOperatorCompareTest.!=.Unix.Default.xml | 17 + ...inaryOperatorCompareTest.!=.Unix.Latest.cs | 10 + ...naryOperatorCompareTest.!=.Unix.Latest.xml | 17 + ...naryOperatorCompareTest.!=.Unix.Preview.cs | 10 + ...aryOperatorCompareTest.!=.Unix.Preview.xml | 17 + ...eratorCompareTest.!=.Windows.Compatible.cs | 10 + ...ratorCompareTest.!=.Windows.Compatible.xml | 17 + ...yOperatorCompareTest.!=.Windows.Default.cs | 10 + ...OperatorCompareTest.!=.Windows.Default.xml | 17 + ...ryOperatorCompareTest.!=.Windows.Latest.cs | 10 + ...yOperatorCompareTest.!=.Windows.Latest.xml | 17 + ...yOperatorCompareTest.!=.Windows.Preview.cs | 10 + ...OperatorCompareTest.!=.Windows.Preview.xml | 17 + ...yOperatorCompareTest.==.Unix.Compatible.cs | 10 + ...OperatorCompareTest.==.Unix.Compatible.xml | 17 + ...naryOperatorCompareTest.==.Unix.Default.cs | 10 + ...aryOperatorCompareTest.==.Unix.Default.xml | 17 + ...inaryOperatorCompareTest.==.Unix.Latest.cs | 10 + ...naryOperatorCompareTest.==.Unix.Latest.xml | 17 + ...naryOperatorCompareTest.==.Unix.Preview.cs | 10 + ...aryOperatorCompareTest.==.Unix.Preview.xml | 17 + ...eratorCompareTest.==.Windows.Compatible.cs | 10 + ...ratorCompareTest.==.Windows.Compatible.xml | 17 + ...yOperatorCompareTest.==.Windows.Default.cs | 10 + ...OperatorCompareTest.==.Windows.Default.xml | 17 + ...ryOperatorCompareTest.==.Windows.Latest.cs | 10 + ...yOperatorCompareTest.==.Windows.Latest.xml | 17 + ...yOperatorCompareTest.==.Windows.Preview.cs | 10 + ...OperatorCompareTest.==.Windows.Preview.xml | 17 + ...peratorCompareTest.__gt.Unix.Compatible.cs | 10 + ...eratorCompareTest.__gt.Unix.Compatible.xml | 17 + ...ryOperatorCompareTest.__gt.Unix.Default.cs | 10 + ...yOperatorCompareTest.__gt.Unix.Default.xml | 17 + ...aryOperatorCompareTest.__gt.Unix.Latest.cs | 10 + ...ryOperatorCompareTest.__gt.Unix.Latest.xml | 17 + ...ryOperatorCompareTest.__gt.Unix.Preview.cs | 10 + ...yOperatorCompareTest.__gt.Unix.Preview.xml | 17 + ...atorCompareTest.__gt.Windows.Compatible.cs | 10 + ...torCompareTest.__gt.Windows.Compatible.xml | 17 + ...peratorCompareTest.__gt.Windows.Default.cs | 10 + ...eratorCompareTest.__gt.Windows.Default.xml | 17 + ...OperatorCompareTest.__gt.Windows.Latest.cs | 10 + ...peratorCompareTest.__gt.Windows.Latest.xml | 17 + ...peratorCompareTest.__gt.Windows.Preview.cs | 10 + ...eratorCompareTest.__gt.Windows.Preview.xml | 17 + ...eratorCompareTest.__gt=.Unix.Compatible.cs | 10 + ...ratorCompareTest.__gt=.Unix.Compatible.xml | 17 + ...yOperatorCompareTest.__gt=.Unix.Default.cs | 10 + ...OperatorCompareTest.__gt=.Unix.Default.xml | 17 + ...ryOperatorCompareTest.__gt=.Unix.Latest.cs | 10 + ...yOperatorCompareTest.__gt=.Unix.Latest.xml | 17 + ...yOperatorCompareTest.__gt=.Unix.Preview.cs | 10 + ...OperatorCompareTest.__gt=.Unix.Preview.xml | 17 + ...torCompareTest.__gt=.Windows.Compatible.cs | 10 + ...orCompareTest.__gt=.Windows.Compatible.xml | 17 + ...eratorCompareTest.__gt=.Windows.Default.cs | 10 + ...ratorCompareTest.__gt=.Windows.Default.xml | 17 + ...peratorCompareTest.__gt=.Windows.Latest.cs | 10 + ...eratorCompareTest.__gt=.Windows.Latest.xml | 17 + ...eratorCompareTest.__gt=.Windows.Preview.cs | 10 + ...ratorCompareTest.__gt=.Windows.Preview.xml | 17 + ...peratorCompareTest.__lt.Unix.Compatible.cs | 10 + ...eratorCompareTest.__lt.Unix.Compatible.xml | 17 + ...ryOperatorCompareTest.__lt.Unix.Default.cs | 10 + ...yOperatorCompareTest.__lt.Unix.Default.xml | 17 + ...aryOperatorCompareTest.__lt.Unix.Latest.cs | 10 + ...ryOperatorCompareTest.__lt.Unix.Latest.xml | 17 + ...ryOperatorCompareTest.__lt.Unix.Preview.cs | 10 + ...yOperatorCompareTest.__lt.Unix.Preview.xml | 17 + ...atorCompareTest.__lt.Windows.Compatible.cs | 10 + ...torCompareTest.__lt.Windows.Compatible.xml | 17 + ...peratorCompareTest.__lt.Windows.Default.cs | 10 + ...eratorCompareTest.__lt.Windows.Default.xml | 17 + ...OperatorCompareTest.__lt.Windows.Latest.cs | 10 + ...peratorCompareTest.__lt.Windows.Latest.xml | 17 + ...peratorCompareTest.__lt.Windows.Preview.cs | 10 + ...eratorCompareTest.__lt.Windows.Preview.xml | 17 + ...eratorCompareTest.__lt=.Unix.Compatible.cs | 10 + ...ratorCompareTest.__lt=.Unix.Compatible.xml | 17 + ...yOperatorCompareTest.__lt=.Unix.Default.cs | 10 + ...OperatorCompareTest.__lt=.Unix.Default.xml | 17 + ...ryOperatorCompareTest.__lt=.Unix.Latest.cs | 10 + ...yOperatorCompareTest.__lt=.Unix.Latest.xml | 17 + ...yOperatorCompareTest.__lt=.Unix.Preview.cs | 10 + ...OperatorCompareTest.__lt=.Unix.Preview.xml | 17 + ...torCompareTest.__lt=.Windows.Compatible.cs | 10 + ...orCompareTest.__lt=.Windows.Compatible.xml | 17 + ...eratorCompareTest.__lt=.Windows.Default.cs | 10 + ...ratorCompareTest.__lt=.Windows.Default.xml | 17 + ...peratorCompareTest.__lt=.Windows.Latest.cs | 10 + ...eratorCompareTest.__lt=.Windows.Latest.xml | 17 + ...eratorCompareTest.__lt=.Windows.Preview.cs | 10 + ...ratorCompareTest.__lt=.Windows.Preview.xml | 17 + ...odyImportTest.BreakTest.Unix.Compatible.cs | 15 + ...dyImportTest.BreakTest.Unix.Compatible.xml | 19 + ...onBodyImportTest.BreakTest.Unix.Default.cs | 15 + ...nBodyImportTest.BreakTest.Unix.Default.xml | 19 + ...ionBodyImportTest.BreakTest.Unix.Latest.cs | 15 + ...onBodyImportTest.BreakTest.Unix.Latest.xml | 19 + ...onBodyImportTest.BreakTest.Unix.Preview.cs | 15 + ...nBodyImportTest.BreakTest.Unix.Preview.xml | 19 + ...ImportTest.BreakTest.Windows.Compatible.cs | 15 + ...mportTest.BreakTest.Windows.Compatible.xml | 19 + ...odyImportTest.BreakTest.Windows.Default.cs | 15 + ...dyImportTest.BreakTest.Windows.Default.xml | 19 + ...BodyImportTest.BreakTest.Windows.Latest.cs | 15 + ...odyImportTest.BreakTest.Windows.Latest.xml | 19 + ...odyImportTest.BreakTest.Windows.Preview.cs | 15 + ...dyImportTest.BreakTest.Windows.Preview.xml | 19 + ...StyleFunctionalCastTest.Unix.Compatible.cs | 10 + ...tyleFunctionalCastTest.Unix.Compatible.xml | 14 + ...t.CStyleFunctionalCastTest.Unix.Default.cs | 10 + ....CStyleFunctionalCastTest.Unix.Default.xml | 14 + ...st.CStyleFunctionalCastTest.Unix.Latest.cs | 10 + ...t.CStyleFunctionalCastTest.Unix.Latest.xml | 14 + ...t.CStyleFunctionalCastTest.Unix.Preview.cs | 10 + ....CStyleFunctionalCastTest.Unix.Preview.xml | 14 + ...leFunctionalCastTest.Windows.Compatible.cs | 10 + ...eFunctionalCastTest.Windows.Compatible.xml | 14 + ...StyleFunctionalCastTest.Windows.Default.cs | 10 + ...tyleFunctionalCastTest.Windows.Default.xml | 14 + ...CStyleFunctionalCastTest.Windows.Latest.cs | 10 + ...StyleFunctionalCastTest.Windows.Latest.xml | 14 + ...StyleFunctionalCastTest.Windows.Preview.cs | 10 + ...tyleFunctionalCastTest.Windows.Preview.xml | 14 + ...rtTest.CallFunctionTest.Unix.Compatible.cs | 14 + ...tTest.CallFunctionTest.Unix.Compatible.xml | 15 + ...mportTest.CallFunctionTest.Unix.Default.cs | 14 + ...portTest.CallFunctionTest.Unix.Default.xml | 15 + ...ImportTest.CallFunctionTest.Unix.Latest.cs | 14 + ...mportTest.CallFunctionTest.Unix.Latest.xml | 15 + ...mportTest.CallFunctionTest.Unix.Preview.cs | 14 + ...portTest.CallFunctionTest.Unix.Preview.xml | 15 + ...est.CallFunctionTest.Windows.Compatible.cs | 14 + ...st.CallFunctionTest.Windows.Compatible.xml | 15 + ...rtTest.CallFunctionTest.Windows.Default.cs | 14 + ...tTest.CallFunctionTest.Windows.Default.xml | 15 + ...ortTest.CallFunctionTest.Windows.Latest.cs | 14 + ...rtTest.CallFunctionTest.Windows.Latest.xml | 15 + ...rtTest.CallFunctionTest.Windows.Preview.cs | 14 + ...tTest.CallFunctionTest.Windows.Preview.xml | 15 + ...allFunctionWithArgsTest.Unix.Compatible.cs | 14 + ...llFunctionWithArgsTest.Unix.Compatible.xml | 21 + ...t.CallFunctionWithArgsTest.Unix.Default.cs | 14 + ....CallFunctionWithArgsTest.Unix.Default.xml | 21 + ...st.CallFunctionWithArgsTest.Unix.Latest.cs | 14 + ...t.CallFunctionWithArgsTest.Unix.Latest.xml | 21 + ...t.CallFunctionWithArgsTest.Unix.Preview.cs | 14 + ....CallFunctionWithArgsTest.Unix.Preview.xml | 21 + ...FunctionWithArgsTest.Windows.Compatible.cs | 14 + ...unctionWithArgsTest.Windows.Compatible.xml | 21 + ...allFunctionWithArgsTest.Windows.Default.cs | 14 + ...llFunctionWithArgsTest.Windows.Default.xml | 21 + ...CallFunctionWithArgsTest.Windows.Latest.cs | 14 + ...allFunctionWithArgsTest.Windows.Latest.xml | 21 + ...allFunctionWithArgsTest.Windows.Preview.cs | 14 + ...llFunctionWithArgsTest.Windows.Preview.xml | 21 + ...Test.CaseNoCompoundTest.Unix.Compatible.cs | 24 + ...est.CaseNoCompoundTest.Unix.Compatible.xml | 28 + ...ortTest.CaseNoCompoundTest.Unix.Default.cs | 24 + ...rtTest.CaseNoCompoundTest.Unix.Default.xml | 28 + ...portTest.CaseNoCompoundTest.Unix.Latest.cs | 24 + ...ortTest.CaseNoCompoundTest.Unix.Latest.xml | 28 + ...ortTest.CaseNoCompoundTest.Unix.Preview.cs | 24 + ...rtTest.CaseNoCompoundTest.Unix.Preview.xml | 28 + ...t.CaseNoCompoundTest.Windows.Compatible.cs | 24 + ....CaseNoCompoundTest.Windows.Compatible.xml | 28 + ...Test.CaseNoCompoundTest.Windows.Default.cs | 24 + ...est.CaseNoCompoundTest.Windows.Default.xml | 28 + ...tTest.CaseNoCompoundTest.Windows.Latest.cs | 24 + ...Test.CaseNoCompoundTest.Windows.Latest.xml | 28 + ...Test.CaseNoCompoundTest.Windows.Preview.cs | 24 + ...est.CaseNoCompoundTest.Windows.Preview.xml | 28 + ...BodyImportTest.CaseTest.Unix.Compatible.cs | 24 + ...odyImportTest.CaseTest.Unix.Compatible.xml | 28 + ...ionBodyImportTest.CaseTest.Unix.Default.cs | 24 + ...onBodyImportTest.CaseTest.Unix.Default.xml | 28 + ...tionBodyImportTest.CaseTest.Unix.Latest.cs | 24 + ...ionBodyImportTest.CaseTest.Unix.Latest.xml | 28 + ...ionBodyImportTest.CaseTest.Unix.Preview.cs | 24 + ...onBodyImportTest.CaseTest.Unix.Preview.xml | 28 + ...yImportTest.CaseTest.Windows.Compatible.cs | 24 + ...ImportTest.CaseTest.Windows.Compatible.xml | 28 + ...BodyImportTest.CaseTest.Windows.Default.cs | 24 + ...odyImportTest.CaseTest.Windows.Default.xml | 28 + ...nBodyImportTest.CaseTest.Windows.Latest.cs | 24 + ...BodyImportTest.CaseTest.Windows.Latest.xml | 28 + ...BodyImportTest.CaseTest.Windows.Preview.cs | 24 + ...odyImportTest.CaseTest.Windows.Preview.xml | 28 + ...CompareMultipleEnumTest.Unix.Compatible.cs | 19 + ...ompareMultipleEnumTest.Unix.Compatible.xml | 26 + ...st.CompareMultipleEnumTest.Unix.Default.cs | 19 + ...t.CompareMultipleEnumTest.Unix.Default.xml | 26 + ...est.CompareMultipleEnumTest.Unix.Latest.cs | 19 + ...st.CompareMultipleEnumTest.Unix.Latest.xml | 26 + ...st.CompareMultipleEnumTest.Unix.Preview.cs | 19 + ...t.CompareMultipleEnumTest.Unix.Preview.xml | 26 + ...pareMultipleEnumTest.Windows.Compatible.cs | 19 + ...areMultipleEnumTest.Windows.Compatible.xml | 26 + ...CompareMultipleEnumTest.Windows.Default.cs | 19 + ...ompareMultipleEnumTest.Windows.Default.xml | 26 + ....CompareMultipleEnumTest.Windows.Latest.cs | 19 + ...CompareMultipleEnumTest.Windows.Latest.xml | 26 + ...CompareMultipleEnumTest.Windows.Preview.cs | 19 + ...ompareMultipleEnumTest.Windows.Preview.xml | 26 + ...ConditionalOperatorTest.Unix.Compatible.cs | 10 + ...onditionalOperatorTest.Unix.Compatible.xml | 20 + ...st.ConditionalOperatorTest.Unix.Default.cs | 10 + ...t.ConditionalOperatorTest.Unix.Default.xml | 20 + ...est.ConditionalOperatorTest.Unix.Latest.cs | 10 + ...st.ConditionalOperatorTest.Unix.Latest.xml | 20 + ...st.ConditionalOperatorTest.Unix.Preview.cs | 10 + ...t.ConditionalOperatorTest.Unix.Preview.xml | 20 + ...ditionalOperatorTest.Windows.Compatible.cs | 10 + ...itionalOperatorTest.Windows.Compatible.xml | 20 + ...ConditionalOperatorTest.Windows.Default.cs | 10 + ...onditionalOperatorTest.Windows.Default.xml | 20 + ....ConditionalOperatorTest.Windows.Latest.cs | 10 + ...ConditionalOperatorTest.Windows.Latest.xml | 20 + ...ConditionalOperatorTest.Windows.Preview.cs | 10 + ...onditionalOperatorTest.Windows.Preview.xml | 20 + ...ImportTest.ContinueTest.Unix.Compatible.cs | 15 + ...mportTest.ContinueTest.Unix.Compatible.xml | 19 + ...odyImportTest.ContinueTest.Unix.Default.cs | 15 + ...dyImportTest.ContinueTest.Unix.Default.xml | 19 + ...BodyImportTest.ContinueTest.Unix.Latest.cs | 15 + ...odyImportTest.ContinueTest.Unix.Latest.xml | 19 + ...odyImportTest.ContinueTest.Unix.Preview.cs | 15 + ...dyImportTest.ContinueTest.Unix.Preview.xml | 19 + ...ortTest.ContinueTest.Windows.Compatible.cs | 15 + ...rtTest.ContinueTest.Windows.Compatible.xml | 19 + ...ImportTest.ContinueTest.Windows.Default.cs | 15 + ...mportTest.ContinueTest.Windows.Default.xml | 19 + ...yImportTest.ContinueTest.Windows.Latest.cs | 15 + ...ImportTest.ContinueTest.Windows.Latest.xml | 19 + ...ImportTest.ContinueTest.Windows.Preview.cs | 15 + ...mportTest.ContinueTest.Windows.Preview.xml | 19 + ...rtTest.CxxConstCastTest.Unix.Compatible.cs | 10 + ...tTest.CxxConstCastTest.Unix.Compatible.xml | 14 + ...mportTest.CxxConstCastTest.Unix.Default.cs | 10 + ...portTest.CxxConstCastTest.Unix.Default.xml | 14 + ...ImportTest.CxxConstCastTest.Unix.Latest.cs | 10 + ...mportTest.CxxConstCastTest.Unix.Latest.xml | 14 + ...mportTest.CxxConstCastTest.Unix.Preview.cs | 10 + ...portTest.CxxConstCastTest.Unix.Preview.xml | 14 + ...est.CxxConstCastTest.Windows.Compatible.cs | 10 + ...st.CxxConstCastTest.Windows.Compatible.xml | 14 + ...rtTest.CxxConstCastTest.Windows.Default.cs | 10 + ...tTest.CxxConstCastTest.Windows.Default.xml | 14 + ...ortTest.CxxConstCastTest.Windows.Latest.cs | 10 + ...rtTest.CxxConstCastTest.Windows.Latest.xml | 14 + ...rtTest.CxxConstCastTest.Windows.Preview.cs | 10 + ...tTest.CxxConstCastTest.Windows.Preview.xml | 14 + ...Test.CxxDynamicCastTest.Unix.Compatible.cs | 46 + ...est.CxxDynamicCastTest.Unix.Compatible.xml | 54 + ...ortTest.CxxDynamicCastTest.Unix.Default.cs | 33 + ...rtTest.CxxDynamicCastTest.Unix.Default.xml | 36 + ...portTest.CxxDynamicCastTest.Unix.Latest.cs | 33 + ...ortTest.CxxDynamicCastTest.Unix.Latest.xml | 36 + ...ortTest.CxxDynamicCastTest.Unix.Preview.cs | 33 + ...rtTest.CxxDynamicCastTest.Unix.Preview.xml | 36 + ...t.CxxDynamicCastTest.Windows.Compatible.cs | 46 + ....CxxDynamicCastTest.Windows.Compatible.xml | 54 + ...Test.CxxDynamicCastTest.Windows.Default.cs | 33 + ...est.CxxDynamicCastTest.Windows.Default.xml | 36 + ...tTest.CxxDynamicCastTest.Windows.Latest.cs | 33 + ...Test.CxxDynamicCastTest.Windows.Latest.xml | 36 + ...Test.CxxDynamicCastTest.Windows.Preview.cs | 33 + ...est.CxxDynamicCastTest.Windows.Preview.xml | 36 + ...t.CxxFunctionalCastTest.Unix.Compatible.cs | 10 + ....CxxFunctionalCastTest.Unix.Compatible.xml | 14 + ...Test.CxxFunctionalCastTest.Unix.Default.cs | 10 + ...est.CxxFunctionalCastTest.Unix.Default.xml | 14 + ...tTest.CxxFunctionalCastTest.Unix.Latest.cs | 10 + ...Test.CxxFunctionalCastTest.Unix.Latest.xml | 14 + ...Test.CxxFunctionalCastTest.Unix.Preview.cs | 10 + ...est.CxxFunctionalCastTest.Unix.Preview.xml | 14 + ...xxFunctionalCastTest.Windows.Compatible.cs | 10 + ...xFunctionalCastTest.Windows.Compatible.xml | 14 + ...t.CxxFunctionalCastTest.Windows.Default.cs | 10 + ....CxxFunctionalCastTest.Windows.Default.xml | 14 + ...st.CxxFunctionalCastTest.Windows.Latest.cs | 10 + ...t.CxxFunctionalCastTest.Windows.Latest.xml | 14 + ...t.CxxFunctionalCastTest.Windows.Preview.cs | 10 + ....CxxFunctionalCastTest.Windows.Preview.xml | 14 + ....CxxReinterpretCastTest.Unix.Compatible.cs | 10 + ...CxxReinterpretCastTest.Unix.Compatible.xml | 14 + ...est.CxxReinterpretCastTest.Unix.Default.cs | 10 + ...st.CxxReinterpretCastTest.Unix.Default.xml | 14 + ...Test.CxxReinterpretCastTest.Unix.Latest.cs | 10 + ...est.CxxReinterpretCastTest.Unix.Latest.xml | 14 + ...est.CxxReinterpretCastTest.Unix.Preview.cs | 10 + ...st.CxxReinterpretCastTest.Unix.Preview.xml | 14 + ...xReinterpretCastTest.Windows.Compatible.cs | 10 + ...ReinterpretCastTest.Windows.Compatible.xml | 14 + ....CxxReinterpretCastTest.Windows.Default.cs | 10 + ...CxxReinterpretCastTest.Windows.Default.xml | 14 + ...t.CxxReinterpretCastTest.Windows.Latest.cs | 10 + ....CxxReinterpretCastTest.Windows.Latest.xml | 14 + ....CxxReinterpretCastTest.Windows.Preview.cs | 10 + ...CxxReinterpretCastTest.Windows.Preview.xml | 14 + ...tTest.CxxStaticCastTest.Unix.Compatible.cs | 10 + ...Test.CxxStaticCastTest.Unix.Compatible.xml | 14 + ...portTest.CxxStaticCastTest.Unix.Default.cs | 10 + ...ortTest.CxxStaticCastTest.Unix.Default.xml | 14 + ...mportTest.CxxStaticCastTest.Unix.Latest.cs | 10 + ...portTest.CxxStaticCastTest.Unix.Latest.xml | 14 + ...portTest.CxxStaticCastTest.Unix.Preview.cs | 10 + ...ortTest.CxxStaticCastTest.Unix.Preview.xml | 14 + ...st.CxxStaticCastTest.Windows.Compatible.cs | 10 + ...t.CxxStaticCastTest.Windows.Compatible.xml | 14 + ...tTest.CxxStaticCastTest.Windows.Default.cs | 10 + ...Test.CxxStaticCastTest.Windows.Default.xml | 14 + ...rtTest.CxxStaticCastTest.Windows.Latest.cs | 10 + ...tTest.CxxStaticCastTest.Windows.Latest.xml | 14 + ...tTest.CxxStaticCastTest.Windows.Preview.cs | 10 + ...Test.CxxStaticCastTest.Windows.Preview.xml | 14 + ...BodyImportTest.DeclTest.Unix.Compatible.cs | 13 + ...odyImportTest.DeclTest.Unix.Compatible.xml | 14 + ...ionBodyImportTest.DeclTest.Unix.Default.cs | 13 + ...onBodyImportTest.DeclTest.Unix.Default.xml | 14 + ...tionBodyImportTest.DeclTest.Unix.Latest.cs | 13 + ...ionBodyImportTest.DeclTest.Unix.Latest.xml | 14 + ...ionBodyImportTest.DeclTest.Unix.Preview.cs | 13 + ...onBodyImportTest.DeclTest.Unix.Preview.xml | 14 + ...yImportTest.DeclTest.Windows.Compatible.cs | 13 + ...ImportTest.DeclTest.Windows.Compatible.xml | 14 + ...BodyImportTest.DeclTest.Windows.Default.cs | 13 + ...odyImportTest.DeclTest.Windows.Default.xml | 14 + ...nBodyImportTest.DeclTest.Windows.Latest.cs | 13 + ...BodyImportTest.DeclTest.Windows.Latest.xml | 14 + ...BodyImportTest.DeclTest.Windows.Preview.cs | 13 + ...odyImportTest.DeclTest.Windows.Preview.xml | 14 + ...tTest.DoNonCompoundTest.Unix.Compatible.cs | 17 + ...Test.DoNonCompoundTest.Unix.Compatible.xml | 21 + ...portTest.DoNonCompoundTest.Unix.Default.cs | 17 + ...ortTest.DoNonCompoundTest.Unix.Default.xml | 21 + ...mportTest.DoNonCompoundTest.Unix.Latest.cs | 17 + ...portTest.DoNonCompoundTest.Unix.Latest.xml | 21 + ...portTest.DoNonCompoundTest.Unix.Preview.cs | 17 + ...ortTest.DoNonCompoundTest.Unix.Preview.xml | 21 + ...st.DoNonCompoundTest.Windows.Compatible.cs | 17 + ...t.DoNonCompoundTest.Windows.Compatible.xml | 21 + ...tTest.DoNonCompoundTest.Windows.Default.cs | 17 + ...Test.DoNonCompoundTest.Windows.Default.xml | 21 + ...rtTest.DoNonCompoundTest.Windows.Latest.cs | 17 + ...tTest.DoNonCompoundTest.Windows.Latest.xml | 21 + ...tTest.DoNonCompoundTest.Windows.Preview.cs | 17 + ...Test.DoNonCompoundTest.Windows.Preview.xml | 21 + ...onBodyImportTest.DoTest.Unix.Compatible.cs | 18 + ...nBodyImportTest.DoTest.Unix.Compatible.xml | 22 + ...ationBodyImportTest.DoTest.Unix.Default.cs | 18 + ...tionBodyImportTest.DoTest.Unix.Default.xml | 22 + ...rationBodyImportTest.DoTest.Unix.Latest.cs | 18 + ...ationBodyImportTest.DoTest.Unix.Latest.xml | 22 + ...ationBodyImportTest.DoTest.Unix.Preview.cs | 18 + ...tionBodyImportTest.DoTest.Unix.Preview.xml | 22 + ...odyImportTest.DoTest.Windows.Compatible.cs | 18 + ...dyImportTest.DoTest.Windows.Compatible.xml | 22 + ...onBodyImportTest.DoTest.Windows.Default.cs | 18 + ...nBodyImportTest.DoTest.Windows.Default.xml | 22 + ...ionBodyImportTest.DoTest.Windows.Latest.cs | 18 + ...onBodyImportTest.DoTest.Windows.Latest.xml | 22 + ...onBodyImportTest.DoTest.Windows.Preview.cs | 18 + ...nBodyImportTest.DoTest.Windows.Preview.xml | 22 + ...Test.ForNonCompoundTest.Unix.Compatible.cs | 67 + ...est.ForNonCompoundTest.Unix.Compatible.xml | 71 + ...ortTest.ForNonCompoundTest.Unix.Default.cs | 67 + ...rtTest.ForNonCompoundTest.Unix.Default.xml | 71 + ...portTest.ForNonCompoundTest.Unix.Latest.cs | 67 + ...ortTest.ForNonCompoundTest.Unix.Latest.xml | 71 + ...ortTest.ForNonCompoundTest.Unix.Preview.cs | 67 + ...rtTest.ForNonCompoundTest.Unix.Preview.xml | 71 + ...t.ForNonCompoundTest.Windows.Compatible.cs | 67 + ....ForNonCompoundTest.Windows.Compatible.xml | 71 + ...Test.ForNonCompoundTest.Windows.Default.cs | 67 + ...est.ForNonCompoundTest.Windows.Default.xml | 71 + ...tTest.ForNonCompoundTest.Windows.Latest.cs | 67 + ...Test.ForNonCompoundTest.Windows.Latest.xml | 71 + ...Test.ForNonCompoundTest.Windows.Preview.cs | 67 + ...est.ForNonCompoundTest.Windows.Preview.xml | 71 + ...nBodyImportTest.ForTest.Unix.Compatible.cs | 67 + ...BodyImportTest.ForTest.Unix.Compatible.xml | 71 + ...tionBodyImportTest.ForTest.Unix.Default.cs | 67 + ...ionBodyImportTest.ForTest.Unix.Default.xml | 71 + ...ationBodyImportTest.ForTest.Unix.Latest.cs | 67 + ...tionBodyImportTest.ForTest.Unix.Latest.xml | 71 + ...tionBodyImportTest.ForTest.Unix.Preview.cs | 67 + ...ionBodyImportTest.ForTest.Unix.Preview.xml | 71 + ...dyImportTest.ForTest.Windows.Compatible.cs | 67 + ...yImportTest.ForTest.Windows.Compatible.xml | 71 + ...nBodyImportTest.ForTest.Windows.Default.cs | 67 + ...BodyImportTest.ForTest.Windows.Default.xml | 71 + ...onBodyImportTest.ForTest.Windows.Latest.cs | 67 + ...nBodyImportTest.ForTest.Windows.Latest.xml | 71 + ...nBodyImportTest.ForTest.Windows.Preview.cs | 67 + ...BodyImportTest.ForTest.Windows.Preview.xml | 71 + ...ImportTest.IfElseIfTest.Unix.Compatible.cs | 19 + ...mportTest.IfElseIfTest.Unix.Compatible.xml | 35 + ...odyImportTest.IfElseIfTest.Unix.Default.cs | 19 + ...dyImportTest.IfElseIfTest.Unix.Default.xml | 35 + ...BodyImportTest.IfElseIfTest.Unix.Latest.cs | 19 + ...odyImportTest.IfElseIfTest.Unix.Latest.xml | 35 + ...odyImportTest.IfElseIfTest.Unix.Preview.cs | 19 + ...dyImportTest.IfElseIfTest.Unix.Preview.xml | 35 + ...ortTest.IfElseIfTest.Windows.Compatible.cs | 19 + ...rtTest.IfElseIfTest.Windows.Compatible.xml | 35 + ...ImportTest.IfElseIfTest.Windows.Default.cs | 19 + ...mportTest.IfElseIfTest.Windows.Default.xml | 35 + ...yImportTest.IfElseIfTest.Windows.Latest.cs | 19 + ...ImportTest.IfElseIfTest.Windows.Latest.xml | 35 + ...ImportTest.IfElseIfTest.Windows.Preview.cs | 19 + ...mportTest.IfElseIfTest.Windows.Preview.xml | 35 + ...t.IfElseNonCompoundTest.Unix.Compatible.cs | 17 + ....IfElseNonCompoundTest.Unix.Compatible.xml | 27 + ...Test.IfElseNonCompoundTest.Unix.Default.cs | 17 + ...est.IfElseNonCompoundTest.Unix.Default.xml | 27 + ...tTest.IfElseNonCompoundTest.Unix.Latest.cs | 17 + ...Test.IfElseNonCompoundTest.Unix.Latest.xml | 27 + ...Test.IfElseNonCompoundTest.Unix.Preview.cs | 17 + ...est.IfElseNonCompoundTest.Unix.Preview.xml | 27 + ...fElseNonCompoundTest.Windows.Compatible.cs | 17 + ...ElseNonCompoundTest.Windows.Compatible.xml | 27 + ...t.IfElseNonCompoundTest.Windows.Default.cs | 17 + ....IfElseNonCompoundTest.Windows.Default.xml | 27 + ...st.IfElseNonCompoundTest.Windows.Latest.cs | 17 + ...t.IfElseNonCompoundTest.Windows.Latest.xml | 27 + ...t.IfElseNonCompoundTest.Windows.Preview.cs | 17 + ....IfElseNonCompoundTest.Windows.Preview.xml | 27 + ...dyImportTest.IfElseTest.Unix.Compatible.cs | 17 + ...yImportTest.IfElseTest.Unix.Compatible.xml | 27 + ...nBodyImportTest.IfElseTest.Unix.Default.cs | 17 + ...BodyImportTest.IfElseTest.Unix.Default.xml | 27 + ...onBodyImportTest.IfElseTest.Unix.Latest.cs | 17 + ...nBodyImportTest.IfElseTest.Unix.Latest.xml | 27 + ...nBodyImportTest.IfElseTest.Unix.Preview.cs | 17 + ...BodyImportTest.IfElseTest.Unix.Preview.xml | 27 + ...mportTest.IfElseTest.Windows.Compatible.cs | 17 + ...portTest.IfElseTest.Windows.Compatible.xml | 27 + ...dyImportTest.IfElseTest.Windows.Default.cs | 17 + ...yImportTest.IfElseTest.Windows.Default.xml | 27 + ...odyImportTest.IfElseTest.Windows.Latest.cs | 17 + ...dyImportTest.IfElseTest.Windows.Latest.xml | 27 + ...dyImportTest.IfElseTest.Windows.Preview.cs | 17 + ...yImportTest.IfElseTest.Windows.Preview.xml | 27 + ...onBodyImportTest.IfTest.Unix.Compatible.cs | 15 + ...nBodyImportTest.IfTest.Unix.Compatible.xml | 25 + ...ationBodyImportTest.IfTest.Unix.Default.cs | 15 + ...tionBodyImportTest.IfTest.Unix.Default.xml | 25 + ...rationBodyImportTest.IfTest.Unix.Latest.cs | 15 + ...ationBodyImportTest.IfTest.Unix.Latest.xml | 25 + ...ationBodyImportTest.IfTest.Unix.Preview.cs | 15 + ...tionBodyImportTest.IfTest.Unix.Preview.xml | 25 + ...odyImportTest.IfTest.Windows.Compatible.cs | 15 + ...dyImportTest.IfTest.Windows.Compatible.xml | 25 + ...onBodyImportTest.IfTest.Windows.Default.cs | 15 + ...nBodyImportTest.IfTest.Windows.Default.xml | 25 + ...ionBodyImportTest.IfTest.Windows.Latest.cs | 15 + ...onBodyImportTest.IfTest.Windows.Latest.xml | 25 + ...onBodyImportTest.IfTest.Windows.Preview.cs | 15 + ...nBodyImportTest.IfTest.Windows.Preview.xml | 25 + ...st.InitListForArrayTest.Unix.Compatible.cs | 28 + ...t.InitListForArrayTest.Unix.Compatible.xml | 29 + ...tTest.InitListForArrayTest.Unix.Default.cs | 28 + ...Test.InitListForArrayTest.Unix.Default.xml | 29 + ...rtTest.InitListForArrayTest.Unix.Latest.cs | 28 + ...tTest.InitListForArrayTest.Unix.Latest.xml | 29 + ...tTest.InitListForArrayTest.Unix.Preview.cs | 28 + ...Test.InitListForArrayTest.Unix.Preview.xml | 29 + ...InitListForArrayTest.Windows.Compatible.cs | 28 + ...nitListForArrayTest.Windows.Compatible.xml | 29 + ...st.InitListForArrayTest.Windows.Default.cs | 28 + ...t.InitListForArrayTest.Windows.Default.xml | 29 + ...est.InitListForArrayTest.Windows.Latest.cs | 28 + ...st.InitListForArrayTest.Windows.Latest.xml | 29 + ...st.InitListForArrayTest.Windows.Preview.cs | 28 + ...t.InitListForArrayTest.Windows.Preview.xml | 29 + ...itListForRecordDeclTest.Unix.Compatible.cs | 37 + ...tListForRecordDeclTest.Unix.Compatible.xml | 40 + ....InitListForRecordDeclTest.Unix.Default.cs | 37 + ...InitListForRecordDeclTest.Unix.Default.xml | 40 + ...t.InitListForRecordDeclTest.Unix.Latest.cs | 37 + ....InitListForRecordDeclTest.Unix.Latest.xml | 40 + ....InitListForRecordDeclTest.Unix.Preview.cs | 37 + ...InitListForRecordDeclTest.Unix.Preview.xml | 40 + ...istForRecordDeclTest.Windows.Compatible.cs | 37 + ...stForRecordDeclTest.Windows.Compatible.xml | 40 + ...itListForRecordDeclTest.Windows.Default.cs | 37 + ...tListForRecordDeclTest.Windows.Default.xml | 40 + ...nitListForRecordDeclTest.Windows.Latest.cs | 37 + ...itListForRecordDeclTest.Windows.Latest.xml | 40 + ...itListForRecordDeclTest.Windows.Preview.cs | 37 + ...tListForRecordDeclTest.Windows.Preview.xml | 40 + ...dyImportTest.MemberTest.Unix.Compatible.cs | 20 + ...yImportTest.MemberTest.Unix.Compatible.xml | 26 + ...nBodyImportTest.MemberTest.Unix.Default.cs | 20 + ...BodyImportTest.MemberTest.Unix.Default.xml | 26 + ...onBodyImportTest.MemberTest.Unix.Latest.cs | 20 + ...nBodyImportTest.MemberTest.Unix.Latest.xml | 26 + ...nBodyImportTest.MemberTest.Unix.Preview.cs | 20 + ...BodyImportTest.MemberTest.Unix.Preview.xml | 26 + ...mportTest.MemberTest.Windows.Compatible.cs | 20 + ...portTest.MemberTest.Windows.Compatible.xml | 26 + ...dyImportTest.MemberTest.Windows.Default.cs | 20 + ...yImportTest.MemberTest.Windows.Default.xml | 26 + ...odyImportTest.MemberTest.Windows.Latest.cs | 20 + ...dyImportTest.MemberTest.Windows.Latest.xml | 26 + ...dyImportTest.MemberTest.Windows.Preview.cs | 20 + ...yImportTest.MemberTest.Windows.Preview.xml | 26 + ...ImportTest.RefToPtrTest.Unix.Compatible.cs | 15 + ...mportTest.RefToPtrTest.Unix.Compatible.xml | 22 + ...odyImportTest.RefToPtrTest.Unix.Default.cs | 15 + ...dyImportTest.RefToPtrTest.Unix.Default.xml | 22 + ...BodyImportTest.RefToPtrTest.Unix.Latest.cs | 15 + ...odyImportTest.RefToPtrTest.Unix.Latest.xml | 22 + ...odyImportTest.RefToPtrTest.Unix.Preview.cs | 15 + ...dyImportTest.RefToPtrTest.Unix.Preview.xml | 22 + ...ortTest.RefToPtrTest.Windows.Compatible.cs | 15 + ...rtTest.RefToPtrTest.Windows.Compatible.xml | 22 + ...ImportTest.RefToPtrTest.Windows.Default.cs | 15 + ...mportTest.RefToPtrTest.Windows.Default.xml | 22 + ...yImportTest.RefToPtrTest.Windows.Latest.cs | 15 + ...ImportTest.RefToPtrTest.Windows.Latest.xml | 22 + ...ImportTest.RefToPtrTest.Windows.Preview.cs | 15 + ...mportTest.RefToPtrTest.Windows.Preview.xml | 22 + ...ooleanLiteralTest.false.Unix.Compatible.cs | 10 + ...oleanLiteralTest.false.Unix.Compatible.xml | 11 + ...XXBooleanLiteralTest.false.Unix.Default.cs | 10 + ...XBooleanLiteralTest.false.Unix.Default.xml | 11 + ...CXXBooleanLiteralTest.false.Unix.Latest.cs | 10 + ...XXBooleanLiteralTest.false.Unix.Latest.xml | 11 + ...XXBooleanLiteralTest.false.Unix.Preview.cs | 10 + ...XBooleanLiteralTest.false.Unix.Preview.xml | 11 + ...eanLiteralTest.false.Windows.Compatible.cs | 10 + ...anLiteralTest.false.Windows.Compatible.xml | 11 + ...ooleanLiteralTest.false.Windows.Default.cs | 10 + ...oleanLiteralTest.false.Windows.Default.xml | 11 + ...BooleanLiteralTest.false.Windows.Latest.cs | 10 + ...ooleanLiteralTest.false.Windows.Latest.xml | 11 + ...ooleanLiteralTest.false.Windows.Preview.cs | 10 + ...oleanLiteralTest.false.Windows.Preview.xml | 11 + ...BooleanLiteralTest.true.Unix.Compatible.cs | 10 + ...ooleanLiteralTest.true.Unix.Compatible.xml | 11 + ...CXXBooleanLiteralTest.true.Unix.Default.cs | 10 + ...XXBooleanLiteralTest.true.Unix.Default.xml | 11 + ...nCXXBooleanLiteralTest.true.Unix.Latest.cs | 10 + ...CXXBooleanLiteralTest.true.Unix.Latest.xml | 11 + ...CXXBooleanLiteralTest.true.Unix.Preview.cs | 10 + ...XXBooleanLiteralTest.true.Unix.Preview.xml | 11 + ...leanLiteralTest.true.Windows.Compatible.cs | 10 + ...eanLiteralTest.true.Windows.Compatible.xml | 11 + ...BooleanLiteralTest.true.Windows.Default.cs | 10 + ...ooleanLiteralTest.true.Windows.Default.xml | 11 + ...XBooleanLiteralTest.true.Windows.Latest.cs | 10 + ...BooleanLiteralTest.true.Windows.Latest.xml | 11 + ...BooleanLiteralTest.true.Windows.Preview.cs | 10 + ...ooleanLiteralTest.true.Windows.Preview.xml | 11 + ...st.ReturnCXXNullPtrTest.Unix.Compatible.cs | 10 + ...t.ReturnCXXNullPtrTest.Unix.Compatible.xml | 11 + ...tTest.ReturnCXXNullPtrTest.Unix.Default.cs | 10 + ...Test.ReturnCXXNullPtrTest.Unix.Default.xml | 11 + ...rtTest.ReturnCXXNullPtrTest.Unix.Latest.cs | 10 + ...tTest.ReturnCXXNullPtrTest.Unix.Latest.xml | 11 + ...tTest.ReturnCXXNullPtrTest.Unix.Preview.cs | 10 + ...Test.ReturnCXXNullPtrTest.Unix.Preview.xml | 11 + ...ReturnCXXNullPtrTest.Windows.Compatible.cs | 10 + ...eturnCXXNullPtrTest.Windows.Compatible.xml | 11 + ...st.ReturnCXXNullPtrTest.Windows.Default.cs | 10 + ...t.ReturnCXXNullPtrTest.Windows.Default.xml | 11 + ...est.ReturnCXXNullPtrTest.Windows.Latest.cs | 10 + ...st.ReturnCXXNullPtrTest.Windows.Latest.xml | 11 + ...st.ReturnCXXNullPtrTest.Windows.Preview.cs | 10 + ...t.ReturnCXXNullPtrTest.Windows.Preview.xml | 11 + ...ortTest.ReturnEmptyTest.Unix.Compatible.cs | 10 + ...rtTest.ReturnEmptyTest.Unix.Compatible.xml | 11 + ...ImportTest.ReturnEmptyTest.Unix.Default.cs | 10 + ...mportTest.ReturnEmptyTest.Unix.Default.xml | 11 + ...yImportTest.ReturnEmptyTest.Unix.Latest.cs | 10 + ...ImportTest.ReturnEmptyTest.Unix.Latest.xml | 11 + ...ImportTest.ReturnEmptyTest.Unix.Preview.cs | 10 + ...mportTest.ReturnEmptyTest.Unix.Preview.xml | 11 + ...Test.ReturnEmptyTest.Windows.Compatible.cs | 10 + ...est.ReturnEmptyTest.Windows.Compatible.xml | 11 + ...ortTest.ReturnEmptyTest.Windows.Default.cs | 10 + ...rtTest.ReturnEmptyTest.Windows.Default.xml | 11 + ...portTest.ReturnEmptyTest.Windows.Latest.cs | 10 + ...ortTest.ReturnEmptyTest.Windows.Latest.xml | 11 + ...ortTest.ReturnEmptyTest.Windows.Preview.cs | 10 + ...rtTest.ReturnEmptyTest.Windows.Preview.xml | 11 + ...LiteralDoubleTest.3.14f.Unix.Compatible.cs | 10 + ...iteralDoubleTest.3.14f.Unix.Compatible.xml | 11 + ...ingLiteralDoubleTest.3.14f.Unix.Default.cs | 10 + ...ngLiteralDoubleTest.3.14f.Unix.Default.xml | 11 + ...tingLiteralDoubleTest.3.14f.Unix.Latest.cs | 10 + ...ingLiteralDoubleTest.3.14f.Unix.Latest.xml | 11 + ...ingLiteralDoubleTest.3.14f.Unix.Preview.cs | 10 + ...ngLiteralDoubleTest.3.14f.Unix.Preview.xml | 11 + ...eralDoubleTest.3.14f.Windows.Compatible.cs | 10 + ...ralDoubleTest.3.14f.Windows.Compatible.xml | 11 + ...LiteralDoubleTest.3.14f.Windows.Default.cs | 10 + ...iteralDoubleTest.3.14f.Windows.Default.xml | 11 + ...gLiteralDoubleTest.3.14f.Windows.Latest.cs | 10 + ...LiteralDoubleTest.3.14f.Windows.Latest.xml | 11 + ...LiteralDoubleTest.3.14f.Windows.Preview.cs | 10 + ...iteralDoubleTest.3.14f.Windows.Preview.xml | 11 + ...LiteralDoubleTest.5e-1f.Unix.Compatible.cs | 10 + ...iteralDoubleTest.5e-1f.Unix.Compatible.xml | 11 + ...ingLiteralDoubleTest.5e-1f.Unix.Default.cs | 10 + ...ngLiteralDoubleTest.5e-1f.Unix.Default.xml | 11 + ...tingLiteralDoubleTest.5e-1f.Unix.Latest.cs | 10 + ...ingLiteralDoubleTest.5e-1f.Unix.Latest.xml | 11 + ...ingLiteralDoubleTest.5e-1f.Unix.Preview.cs | 10 + ...ngLiteralDoubleTest.5e-1f.Unix.Preview.xml | 11 + ...eralDoubleTest.5e-1f.Windows.Compatible.cs | 10 + ...ralDoubleTest.5e-1f.Windows.Compatible.xml | 11 + ...LiteralDoubleTest.5e-1f.Windows.Default.cs | 10 + ...iteralDoubleTest.5e-1f.Windows.Default.xml | 11 + ...gLiteralDoubleTest.5e-1f.Windows.Latest.cs | 10 + ...LiteralDoubleTest.5e-1f.Windows.Latest.xml | 11 + ...LiteralDoubleTest.5e-1f.Windows.Preview.cs | 10 + ...iteralDoubleTest.5e-1f.Windows.Preview.xml | 11 + ...LiteralSingleTest.3.14f.Unix.Compatible.cs | 10 + ...iteralSingleTest.3.14f.Unix.Compatible.xml | 11 + ...ingLiteralSingleTest.3.14f.Unix.Default.cs | 10 + ...ngLiteralSingleTest.3.14f.Unix.Default.xml | 11 + ...tingLiteralSingleTest.3.14f.Unix.Latest.cs | 10 + ...ingLiteralSingleTest.3.14f.Unix.Latest.xml | 11 + ...ingLiteralSingleTest.3.14f.Unix.Preview.cs | 10 + ...ngLiteralSingleTest.3.14f.Unix.Preview.xml | 11 + ...eralSingleTest.3.14f.Windows.Compatible.cs | 10 + ...ralSingleTest.3.14f.Windows.Compatible.xml | 11 + ...LiteralSingleTest.3.14f.Windows.Default.cs | 10 + ...iteralSingleTest.3.14f.Windows.Default.xml | 11 + ...gLiteralSingleTest.3.14f.Windows.Latest.cs | 10 + ...LiteralSingleTest.3.14f.Windows.Latest.xml | 11 + ...LiteralSingleTest.3.14f.Windows.Preview.cs | 10 + ...iteralSingleTest.3.14f.Windows.Preview.xml | 11 + ...LiteralSingleTest.5e-1f.Unix.Compatible.cs | 10 + ...iteralSingleTest.5e-1f.Unix.Compatible.xml | 11 + ...ingLiteralSingleTest.5e-1f.Unix.Default.cs | 10 + ...ngLiteralSingleTest.5e-1f.Unix.Default.xml | 11 + ...tingLiteralSingleTest.5e-1f.Unix.Latest.cs | 10 + ...ingLiteralSingleTest.5e-1f.Unix.Latest.xml | 11 + ...ingLiteralSingleTest.5e-1f.Unix.Preview.cs | 10 + ...ngLiteralSingleTest.5e-1f.Unix.Preview.xml | 11 + ...eralSingleTest.5e-1f.Windows.Compatible.cs | 10 + ...ralSingleTest.5e-1f.Windows.Compatible.xml | 11 + ...LiteralSingleTest.5e-1f.Windows.Default.cs | 10 + ...iteralSingleTest.5e-1f.Windows.Default.xml | 11 + ...gLiteralSingleTest.5e-1f.Windows.Latest.cs | 10 + ...LiteralSingleTest.5e-1f.Windows.Latest.xml | 11 + ...LiteralSingleTest.5e-1f.Windows.Preview.cs | 10 + ...iteralSingleTest.5e-1f.Windows.Preview.xml | 11 + ...IntegerLiteralInt32Test.Unix.Compatible.cs | 10 + ...ntegerLiteralInt32Test.Unix.Compatible.xml | 11 + ...urnIntegerLiteralInt32Test.Unix.Default.cs | 10 + ...rnIntegerLiteralInt32Test.Unix.Default.xml | 11 + ...turnIntegerLiteralInt32Test.Unix.Latest.cs | 10 + ...urnIntegerLiteralInt32Test.Unix.Latest.xml | 11 + ...urnIntegerLiteralInt32Test.Unix.Preview.cs | 10 + ...rnIntegerLiteralInt32Test.Unix.Preview.xml | 11 + ...egerLiteralInt32Test.Windows.Compatible.cs | 10 + ...gerLiteralInt32Test.Windows.Compatible.xml | 11 + ...IntegerLiteralInt32Test.Windows.Default.cs | 10 + ...ntegerLiteralInt32Test.Windows.Default.xml | 11 + ...nIntegerLiteralInt32Test.Windows.Latest.cs | 10 + ...IntegerLiteralInt32Test.Windows.Latest.xml | 11 + ...IntegerLiteralInt32Test.Windows.Preview.cs | 10 + ...ntegerLiteralInt32Test.Windows.Preview.xml | 11 + ...rtTest.ReturnStructTest.Unix.Compatible.cs | 21 + ...tTest.ReturnStructTest.Unix.Compatible.xml | 24 + ...mportTest.ReturnStructTest.Unix.Default.cs | 21 + ...portTest.ReturnStructTest.Unix.Default.xml | 24 + ...ImportTest.ReturnStructTest.Unix.Latest.cs | 21 + ...mportTest.ReturnStructTest.Unix.Latest.xml | 24 + ...mportTest.ReturnStructTest.Unix.Preview.cs | 21 + ...portTest.ReturnStructTest.Unix.Preview.xml | 24 + ...est.ReturnStructTest.Windows.Compatible.cs | 21 + ...st.ReturnStructTest.Windows.Compatible.xml | 24 + ...rtTest.ReturnStructTest.Windows.Default.cs | 21 + ...tTest.ReturnStructTest.Windows.Default.xml | 24 + ...ortTest.ReturnStructTest.Windows.Latest.cs | 21 + ...rtTest.ReturnStructTest.Windows.Latest.xml | 24 + ...rtTest.ReturnStructTest.Windows.Preview.cs | 21 + ...tTest.ReturnStructTest.Windows.Preview.xml | 24 + ...t.SwitchNonCompoundTest.Unix.Compatible.cs | 24 + ....SwitchNonCompoundTest.Unix.Compatible.xml | 28 + ...Test.SwitchNonCompoundTest.Unix.Default.cs | 24 + ...est.SwitchNonCompoundTest.Unix.Default.xml | 28 + ...tTest.SwitchNonCompoundTest.Unix.Latest.cs | 24 + ...Test.SwitchNonCompoundTest.Unix.Latest.xml | 28 + ...Test.SwitchNonCompoundTest.Unix.Preview.cs | 24 + ...est.SwitchNonCompoundTest.Unix.Preview.xml | 28 + ...witchNonCompoundTest.Windows.Compatible.cs | 24 + ...itchNonCompoundTest.Windows.Compatible.xml | 28 + ...t.SwitchNonCompoundTest.Windows.Default.cs | 24 + ....SwitchNonCompoundTest.Windows.Default.xml | 28 + ...st.SwitchNonCompoundTest.Windows.Latest.cs | 24 + ...t.SwitchNonCompoundTest.Windows.Latest.xml | 28 + ...t.SwitchNonCompoundTest.Windows.Preview.cs | 24 + ....SwitchNonCompoundTest.Windows.Preview.xml | 28 + ...dyImportTest.SwitchTest.Unix.Compatible.cs | 16 + ...yImportTest.SwitchTest.Unix.Compatible.xml | 20 + ...nBodyImportTest.SwitchTest.Unix.Default.cs | 16 + ...BodyImportTest.SwitchTest.Unix.Default.xml | 20 + ...onBodyImportTest.SwitchTest.Unix.Latest.cs | 16 + ...nBodyImportTest.SwitchTest.Unix.Latest.xml | 20 + ...nBodyImportTest.SwitchTest.Unix.Preview.cs | 16 + ...BodyImportTest.SwitchTest.Unix.Preview.xml | 20 + ...mportTest.SwitchTest.Windows.Compatible.cs | 16 + ...portTest.SwitchTest.Windows.Compatible.xml | 20 + ...dyImportTest.SwitchTest.Windows.Default.cs | 16 + ...yImportTest.SwitchTest.Windows.Default.xml | 20 + ...odyImportTest.SwitchTest.Windows.Latest.cs | 16 + ...dyImportTest.SwitchTest.Windows.Latest.xml | 20 + ...dyImportTest.SwitchTest.Windows.Preview.cs | 16 + ...yImportTest.SwitchTest.Windows.Preview.xml | 20 + ...UnaryOperatorAddrOfTest.Unix.Compatible.cs | 10 + ...naryOperatorAddrOfTest.Unix.Compatible.xml | 14 + ...st.UnaryOperatorAddrOfTest.Unix.Default.cs | 10 + ...t.UnaryOperatorAddrOfTest.Unix.Default.xml | 14 + ...est.UnaryOperatorAddrOfTest.Unix.Latest.cs | 10 + ...st.UnaryOperatorAddrOfTest.Unix.Latest.xml | 14 + ...st.UnaryOperatorAddrOfTest.Unix.Preview.cs | 10 + ...t.UnaryOperatorAddrOfTest.Unix.Preview.xml | 14 + ...ryOperatorAddrOfTest.Windows.Compatible.cs | 10 + ...yOperatorAddrOfTest.Windows.Compatible.xml | 14 + ...UnaryOperatorAddrOfTest.Windows.Default.cs | 10 + ...naryOperatorAddrOfTest.Windows.Default.xml | 14 + ....UnaryOperatorAddrOfTest.Windows.Latest.cs | 10 + ...UnaryOperatorAddrOfTest.Windows.Latest.xml | 14 + ...UnaryOperatorAddrOfTest.Windows.Preview.cs | 10 + ...naryOperatorAddrOfTest.Windows.Preview.xml | 14 + ....UnaryOperatorDerefTest.Unix.Compatible.cs | 10 + ...UnaryOperatorDerefTest.Unix.Compatible.xml | 14 + ...est.UnaryOperatorDerefTest.Unix.Default.cs | 10 + ...st.UnaryOperatorDerefTest.Unix.Default.xml | 14 + ...Test.UnaryOperatorDerefTest.Unix.Latest.cs | 10 + ...est.UnaryOperatorDerefTest.Unix.Latest.xml | 14 + ...est.UnaryOperatorDerefTest.Unix.Preview.cs | 10 + ...st.UnaryOperatorDerefTest.Unix.Preview.xml | 14 + ...aryOperatorDerefTest.Windows.Compatible.cs | 10 + ...ryOperatorDerefTest.Windows.Compatible.xml | 14 + ....UnaryOperatorDerefTest.Windows.Default.cs | 10 + ...UnaryOperatorDerefTest.Windows.Default.xml | 14 + ...t.UnaryOperatorDerefTest.Windows.Latest.cs | 10 + ....UnaryOperatorDerefTest.Windows.Latest.xml | 14 + ....UnaryOperatorDerefTest.Windows.Preview.cs | 10 + ...UnaryOperatorDerefTest.Windows.Preview.xml | 14 + ...yOperatorLogicalNotTest.Unix.Compatible.cs | 10 + ...OperatorLogicalNotTest.Unix.Compatible.xml | 14 + ...naryOperatorLogicalNotTest.Unix.Default.cs | 10 + ...aryOperatorLogicalNotTest.Unix.Default.xml | 14 + ...UnaryOperatorLogicalNotTest.Unix.Latest.cs | 10 + ...naryOperatorLogicalNotTest.Unix.Latest.xml | 14 + ...naryOperatorLogicalNotTest.Unix.Preview.cs | 10 + ...aryOperatorLogicalNotTest.Unix.Preview.xml | 14 + ...eratorLogicalNotTest.Windows.Compatible.cs | 10 + ...ratorLogicalNotTest.Windows.Compatible.xml | 14 + ...yOperatorLogicalNotTest.Windows.Default.cs | 10 + ...OperatorLogicalNotTest.Windows.Default.xml | 14 + ...ryOperatorLogicalNotTest.Windows.Latest.cs | 10 + ...yOperatorLogicalNotTest.Windows.Latest.xml | 14 + ...yOperatorLogicalNotTest.Windows.Preview.cs | 10 + ...OperatorLogicalNotTest.Windows.Preview.xml | 14 + ...yOperatorPostfixTest.++.Unix.Compatible.cs | 10 + ...OperatorPostfixTest.++.Unix.Compatible.xml | 14 + ...naryOperatorPostfixTest.++.Unix.Default.cs | 10 + ...aryOperatorPostfixTest.++.Unix.Default.xml | 14 + ...UnaryOperatorPostfixTest.++.Unix.Latest.cs | 10 + ...naryOperatorPostfixTest.++.Unix.Latest.xml | 14 + ...naryOperatorPostfixTest.++.Unix.Preview.cs | 10 + ...aryOperatorPostfixTest.++.Unix.Preview.xml | 14 + ...eratorPostfixTest.++.Windows.Compatible.cs | 10 + ...ratorPostfixTest.++.Windows.Compatible.xml | 14 + ...yOperatorPostfixTest.++.Windows.Default.cs | 10 + ...OperatorPostfixTest.++.Windows.Default.xml | 14 + ...ryOperatorPostfixTest.++.Windows.Latest.cs | 10 + ...yOperatorPostfixTest.++.Windows.Latest.xml | 14 + ...yOperatorPostfixTest.++.Windows.Preview.cs | 10 + ...OperatorPostfixTest.++.Windows.Preview.xml | 14 + ...yOperatorPostfixTest.--.Unix.Compatible.cs | 10 + ...OperatorPostfixTest.--.Unix.Compatible.xml | 14 + ...naryOperatorPostfixTest.--.Unix.Default.cs | 10 + ...aryOperatorPostfixTest.--.Unix.Default.xml | 14 + ...UnaryOperatorPostfixTest.--.Unix.Latest.cs | 10 + ...naryOperatorPostfixTest.--.Unix.Latest.xml | 14 + ...naryOperatorPostfixTest.--.Unix.Preview.cs | 10 + ...aryOperatorPostfixTest.--.Unix.Preview.xml | 14 + ...eratorPostfixTest.--.Windows.Compatible.cs | 10 + ...ratorPostfixTest.--.Windows.Compatible.xml | 14 + ...yOperatorPostfixTest.--.Windows.Default.cs | 10 + ...OperatorPostfixTest.--.Windows.Default.xml | 14 + ...ryOperatorPostfixTest.--.Windows.Latest.cs | 10 + ...yOperatorPostfixTest.--.Windows.Latest.xml | 14 + ...yOperatorPostfixTest.--.Windows.Preview.cs | 10 + ...OperatorPostfixTest.--.Windows.Preview.xml | 14 + ...ryOperatorPrefixTest.++.Unix.Compatible.cs | 10 + ...yOperatorPrefixTest.++.Unix.Compatible.xml | 14 + ...UnaryOperatorPrefixTest.++.Unix.Default.cs | 10 + ...naryOperatorPrefixTest.++.Unix.Default.xml | 14 + ....UnaryOperatorPrefixTest.++.Unix.Latest.cs | 10 + ...UnaryOperatorPrefixTest.++.Unix.Latest.xml | 14 + ...UnaryOperatorPrefixTest.++.Unix.Preview.cs | 10 + ...naryOperatorPrefixTest.++.Unix.Preview.xml | 14 + ...peratorPrefixTest.++.Windows.Compatible.cs | 10 + ...eratorPrefixTest.++.Windows.Compatible.xml | 14 + ...ryOperatorPrefixTest.++.Windows.Default.cs | 10 + ...yOperatorPrefixTest.++.Windows.Default.xml | 14 + ...aryOperatorPrefixTest.++.Windows.Latest.cs | 10 + ...ryOperatorPrefixTest.++.Windows.Latest.xml | 14 + ...ryOperatorPrefixTest.++.Windows.Preview.cs | 10 + ...yOperatorPrefixTest.++.Windows.Preview.xml | 14 + ...aryOperatorPrefixTest.+.Unix.Compatible.cs | 10 + ...ryOperatorPrefixTest.+.Unix.Compatible.xml | 14 + ....UnaryOperatorPrefixTest.+.Unix.Default.cs | 10 + ...UnaryOperatorPrefixTest.+.Unix.Default.xml | 14 + ...t.UnaryOperatorPrefixTest.+.Unix.Latest.cs | 10 + ....UnaryOperatorPrefixTest.+.Unix.Latest.xml | 14 + ....UnaryOperatorPrefixTest.+.Unix.Preview.cs | 10 + ...UnaryOperatorPrefixTest.+.Unix.Preview.xml | 14 + ...OperatorPrefixTest.+.Windows.Compatible.cs | 10 + ...peratorPrefixTest.+.Windows.Compatible.xml | 14 + ...aryOperatorPrefixTest.+.Windows.Default.cs | 10 + ...ryOperatorPrefixTest.+.Windows.Default.xml | 14 + ...naryOperatorPrefixTest.+.Windows.Latest.cs | 10 + ...aryOperatorPrefixTest.+.Windows.Latest.xml | 14 + ...aryOperatorPrefixTest.+.Windows.Preview.cs | 10 + ...ryOperatorPrefixTest.+.Windows.Preview.xml | 14 + ...ryOperatorPrefixTest.--.Unix.Compatible.cs | 10 + ...yOperatorPrefixTest.--.Unix.Compatible.xml | 14 + ...UnaryOperatorPrefixTest.--.Unix.Default.cs | 10 + ...naryOperatorPrefixTest.--.Unix.Default.xml | 14 + ....UnaryOperatorPrefixTest.--.Unix.Latest.cs | 10 + ...UnaryOperatorPrefixTest.--.Unix.Latest.xml | 14 + ...UnaryOperatorPrefixTest.--.Unix.Preview.cs | 10 + ...naryOperatorPrefixTest.--.Unix.Preview.xml | 14 + ...peratorPrefixTest.--.Windows.Compatible.cs | 10 + ...eratorPrefixTest.--.Windows.Compatible.xml | 14 + ...ryOperatorPrefixTest.--.Windows.Default.cs | 10 + ...yOperatorPrefixTest.--.Windows.Default.xml | 14 + ...aryOperatorPrefixTest.--.Windows.Latest.cs | 10 + ...ryOperatorPrefixTest.--.Windows.Latest.xml | 14 + ...ryOperatorPrefixTest.--.Windows.Preview.cs | 10 + ...yOperatorPrefixTest.--.Windows.Preview.xml | 14 + ...aryOperatorPrefixTest.-.Unix.Compatible.cs | 10 + ...ryOperatorPrefixTest.-.Unix.Compatible.xml | 14 + ....UnaryOperatorPrefixTest.-.Unix.Default.cs | 10 + ...UnaryOperatorPrefixTest.-.Unix.Default.xml | 14 + ...t.UnaryOperatorPrefixTest.-.Unix.Latest.cs | 10 + ....UnaryOperatorPrefixTest.-.Unix.Latest.xml | 14 + ....UnaryOperatorPrefixTest.-.Unix.Preview.cs | 10 + ...UnaryOperatorPrefixTest.-.Unix.Preview.xml | 14 + ...OperatorPrefixTest.-.Windows.Compatible.cs | 10 + ...peratorPrefixTest.-.Windows.Compatible.xml | 14 + ...aryOperatorPrefixTest.-.Windows.Default.cs | 10 + ...ryOperatorPrefixTest.-.Windows.Default.xml | 14 + ...naryOperatorPrefixTest.-.Windows.Latest.cs | 10 + ...aryOperatorPrefixTest.-.Windows.Latest.xml | 14 + ...aryOperatorPrefixTest.-.Windows.Preview.cs | 10 + ...ryOperatorPrefixTest.-.Windows.Preview.xml | 14 + ...aryOperatorPrefixTest.~.Unix.Compatible.cs | 10 + ...ryOperatorPrefixTest.~.Unix.Compatible.xml | 14 + ....UnaryOperatorPrefixTest.~.Unix.Default.cs | 10 + ...UnaryOperatorPrefixTest.~.Unix.Default.xml | 14 + ...t.UnaryOperatorPrefixTest.~.Unix.Latest.cs | 10 + ....UnaryOperatorPrefixTest.~.Unix.Latest.xml | 14 + ....UnaryOperatorPrefixTest.~.Unix.Preview.cs | 10 + ...UnaryOperatorPrefixTest.~.Unix.Preview.xml | 14 + ...OperatorPrefixTest.~.Windows.Compatible.cs | 10 + ...peratorPrefixTest.~.Windows.Compatible.xml | 14 + ...aryOperatorPrefixTest.~.Windows.Default.cs | 10 + ...ryOperatorPrefixTest.~.Windows.Default.xml | 14 + ...naryOperatorPrefixTest.~.Windows.Latest.cs | 10 + ...aryOperatorPrefixTest.~.Windows.Latest.xml | 14 + ...aryOperatorPrefixTest.~.Windows.Preview.cs | 10 + ...ryOperatorPrefixTest.~.Windows.Preview.xml | 14 + ...st.WhileNonCompoundTest.Unix.Compatible.cs | 17 + ...t.WhileNonCompoundTest.Unix.Compatible.xml | 21 + ...tTest.WhileNonCompoundTest.Unix.Default.cs | 17 + ...Test.WhileNonCompoundTest.Unix.Default.xml | 21 + ...rtTest.WhileNonCompoundTest.Unix.Latest.cs | 17 + ...tTest.WhileNonCompoundTest.Unix.Latest.xml | 21 + ...tTest.WhileNonCompoundTest.Unix.Preview.cs | 17 + ...Test.WhileNonCompoundTest.Unix.Preview.xml | 21 + ...WhileNonCompoundTest.Windows.Compatible.cs | 17 + ...hileNonCompoundTest.Windows.Compatible.xml | 21 + ...st.WhileNonCompoundTest.Windows.Default.cs | 17 + ...t.WhileNonCompoundTest.Windows.Default.xml | 21 + ...est.WhileNonCompoundTest.Windows.Latest.cs | 17 + ...st.WhileNonCompoundTest.Windows.Latest.xml | 21 + ...st.WhileNonCompoundTest.Windows.Preview.cs | 17 + ...t.WhileNonCompoundTest.Windows.Preview.xml | 21 + ...odyImportTest.WhileTest.Unix.Compatible.cs | 17 + ...dyImportTest.WhileTest.Unix.Compatible.xml | 21 + ...onBodyImportTest.WhileTest.Unix.Default.cs | 17 + ...nBodyImportTest.WhileTest.Unix.Default.xml | 21 + ...ionBodyImportTest.WhileTest.Unix.Latest.cs | 17 + ...onBodyImportTest.WhileTest.Unix.Latest.xml | 21 + ...onBodyImportTest.WhileTest.Unix.Preview.cs | 17 + ...nBodyImportTest.WhileTest.Unix.Preview.xml | 21 + ...ImportTest.WhileTest.Windows.Compatible.cs | 17 + ...mportTest.WhileTest.Windows.Compatible.xml | 21 + ...odyImportTest.WhileTest.Windows.Default.cs | 17 + ...dyImportTest.WhileTest.Windows.Default.xml | 21 + ...BodyImportTest.WhileTest.Windows.Latest.cs | 17 + ...odyImportTest.WhileTest.Windows.Latest.xml | 21 + ...odyImportTest.WhileTest.Windows.Preview.cs | 17 + ...dyImportTest.WhileTest.Windows.Preview.xml | 21 + ...Test.ArrayParameterTest.Unix.Compatible.cs | 10 + ...est.ArrayParameterTest.Unix.Compatible.xml | 13 + ...ortTest.ArrayParameterTest.Unix.Default.cs | 10 + ...rtTest.ArrayParameterTest.Unix.Default.xml | 13 + ...portTest.ArrayParameterTest.Unix.Latest.cs | 10 + ...ortTest.ArrayParameterTest.Unix.Latest.xml | 13 + ...ortTest.ArrayParameterTest.Unix.Preview.cs | 10 + ...rtTest.ArrayParameterTest.Unix.Preview.xml | 13 + ...t.ArrayParameterTest.Windows.Compatible.cs | 10 + ....ArrayParameterTest.Windows.Compatible.xml | 13 + ...Test.ArrayParameterTest.Windows.Default.cs | 10 + ...est.ArrayParameterTest.Windows.Default.xml | 13 + ...tTest.ArrayParameterTest.Windows.Latest.cs | 10 + ...Test.ArrayParameterTest.Windows.Latest.xml | 13 + ...Test.ArrayParameterTest.Windows.Preview.cs | 10 + ...est.ArrayParameterTest.Windows.Preview.xml | 13 + ...DllImportTest.BasicTest.Unix.Compatible.cs | 10 + ...llImportTest.BasicTest.Unix.Compatible.xml | 10 + ...ionDllImportTest.BasicTest.Unix.Default.cs | 10 + ...onDllImportTest.BasicTest.Unix.Default.xml | 10 + ...tionDllImportTest.BasicTest.Unix.Latest.cs | 10 + ...ionDllImportTest.BasicTest.Unix.Latest.xml | 10 + ...ionDllImportTest.BasicTest.Unix.Preview.cs | 10 + ...onDllImportTest.BasicTest.Unix.Preview.xml | 10 + ...ImportTest.BasicTest.Windows.Compatible.cs | 10 + ...mportTest.BasicTest.Windows.Compatible.xml | 10 + ...DllImportTest.BasicTest.Windows.Default.cs | 10 + ...llImportTest.BasicTest.Windows.Default.xml | 10 + ...nDllImportTest.BasicTest.Windows.Latest.cs | 10 + ...DllImportTest.BasicTest.Windows.Latest.xml | 10 + ...DllImportTest.BasicTest.Windows.Preview.cs | 10 + ...llImportTest.BasicTest.Windows.Preview.xml | 10 + ...ionPointerParameterTest.Unix.Compatible.cs | 11 + ...onPointerParameterTest.Unix.Compatible.xml | 13 + ...nctionPointerParameterTest.Unix.Default.cs | 10 + ...ctionPointerParameterTest.Unix.Default.xml | 13 + ...unctionPointerParameterTest.Unix.Latest.cs | 10 + ...nctionPointerParameterTest.Unix.Latest.xml | 13 + ...nctionPointerParameterTest.Unix.Preview.cs | 10 + ...ctionPointerParameterTest.Unix.Preview.xml | 13 + ...PointerParameterTest.Windows.Compatible.cs | 11 + ...ointerParameterTest.Windows.Compatible.xml | 13 + ...ionPointerParameterTest.Windows.Default.cs | 10 + ...onPointerParameterTest.Windows.Default.xml | 13 + ...tionPointerParameterTest.Windows.Latest.cs | 10 + ...ionPointerParameterTest.Windows.Latest.xml | 13 + ...ionPointerParameterTest.Windows.Preview.cs | 10 + ...onPointerParameterTest.Windows.Preview.xml | 13 + ...portTest.IntrinsicsTest.Unix.Compatible.cs | 0 ...ortTest.IntrinsicsTest.Unix.Compatible.xml | 0 ...lImportTest.IntrinsicsTest.Unix.Default.cs | 0 ...ImportTest.IntrinsicsTest.Unix.Default.xml | 0 ...llImportTest.IntrinsicsTest.Unix.Latest.cs | 0 ...lImportTest.IntrinsicsTest.Unix.Latest.xml | 0 ...lImportTest.IntrinsicsTest.Unix.Preview.cs | 0 ...ImportTest.IntrinsicsTest.Unix.Preview.xml | 0 ...tTest.IntrinsicsTest.Windows.Compatible.cs | 0 ...Test.IntrinsicsTest.Windows.Compatible.xml | 0 ...portTest.IntrinsicsTest.Windows.Default.cs | 0 ...ortTest.IntrinsicsTest.Windows.Default.xml | 0 ...mportTest.IntrinsicsTest.Windows.Latest.cs | 0 ...portTest.IntrinsicsTest.Windows.Latest.xml | 0 ...portTest.IntrinsicsTest.Windows.Preview.cs | 0 ...ortTest.IntrinsicsTest.Windows.Preview.xml | 0 ...mportTest.NamespaceTest.Unix.Compatible.cs | 10 + ...portTest.NamespaceTest.Unix.Compatible.xml | 10 + ...llImportTest.NamespaceTest.Unix.Default.cs | 10 + ...lImportTest.NamespaceTest.Unix.Default.xml | 10 + ...DllImportTest.NamespaceTest.Unix.Latest.cs | 10 + ...llImportTest.NamespaceTest.Unix.Latest.xml | 10 + ...llImportTest.NamespaceTest.Unix.Preview.cs | 10 + ...lImportTest.NamespaceTest.Unix.Preview.xml | 10 + ...rtTest.NamespaceTest.Windows.Compatible.cs | 10 + ...tTest.NamespaceTest.Windows.Compatible.xml | 10 + ...mportTest.NamespaceTest.Windows.Default.cs | 10 + ...portTest.NamespaceTest.Windows.Default.xml | 10 + ...ImportTest.NamespaceTest.Windows.Latest.cs | 10 + ...mportTest.NamespaceTest.Windows.Latest.xml | 10 + ...mportTest.NamespaceTest.Windows.Preview.cs | 10 + ...portTest.NamespaceTest.Windows.Preview.xml | 10 + ...tTest.NoLibraryPathTest.Unix.Compatible.cs | 10 + ...Test.NoLibraryPathTest.Unix.Compatible.xml | 10 + ...portTest.NoLibraryPathTest.Unix.Default.cs | 10 + ...ortTest.NoLibraryPathTest.Unix.Default.xml | 10 + ...mportTest.NoLibraryPathTest.Unix.Latest.cs | 10 + ...portTest.NoLibraryPathTest.Unix.Latest.xml | 10 + ...portTest.NoLibraryPathTest.Unix.Preview.cs | 10 + ...ortTest.NoLibraryPathTest.Unix.Preview.xml | 10 + ...st.NoLibraryPathTest.Windows.Compatible.cs | 10 + ...t.NoLibraryPathTest.Windows.Compatible.xml | 10 + ...tTest.NoLibraryPathTest.Windows.Default.cs | 10 + ...Test.NoLibraryPathTest.Windows.Default.xml | 10 + ...rtTest.NoLibraryPathTest.Windows.Latest.cs | 10 + ...tTest.NoLibraryPathTest.Windows.Latest.xml | 10 + ...tTest.NoLibraryPathTest.Windows.Preview.cs | 10 + ...Test.NoLibraryPathTest.Windows.Preview.xml | 10 + ...arameterTest.double.1.0.Unix.Compatible.cs | 10 + ...rameterTest.double.1.0.Unix.Compatible.xml | 16 + ...alParameterTest.double.1.0.Unix.Default.cs | 10 + ...lParameterTest.double.1.0.Unix.Default.xml | 16 + ...nalParameterTest.double.1.0.Unix.Latest.cs | 10 + ...alParameterTest.double.1.0.Unix.Latest.xml | 16 + ...alParameterTest.double.1.0.Unix.Preview.cs | 10 + ...lParameterTest.double.1.0.Unix.Preview.xml | 16 + ...meterTest.double.1.0.Windows.Compatible.cs | 10 + ...eterTest.double.1.0.Windows.Compatible.xml | 16 + ...arameterTest.double.1.0.Windows.Default.cs | 10 + ...rameterTest.double.1.0.Windows.Default.xml | 16 + ...ParameterTest.double.1.0.Windows.Latest.cs | 10 + ...arameterTest.double.1.0.Windows.Latest.xml | 16 + ...arameterTest.double.1.0.Windows.Preview.cs | 10 + ...rameterTest.double.1.0.Windows.Preview.xml | 16 + ...arameterTest.float.6.0f.Unix.Compatible.cs | 10 + ...rameterTest.float.6.0f.Unix.Compatible.xml | 16 + ...alParameterTest.float.6.0f.Unix.Default.cs | 10 + ...lParameterTest.float.6.0f.Unix.Default.xml | 16 + ...nalParameterTest.float.6.0f.Unix.Latest.cs | 10 + ...alParameterTest.float.6.0f.Unix.Latest.xml | 16 + ...alParameterTest.float.6.0f.Unix.Preview.cs | 10 + ...lParameterTest.float.6.0f.Unix.Preview.xml | 16 + ...meterTest.float.6.0f.Windows.Compatible.cs | 10 + ...eterTest.float.6.0f.Windows.Compatible.xml | 16 + ...arameterTest.float.6.0f.Windows.Default.cs | 10 + ...rameterTest.float.6.0f.Windows.Default.xml | 16 + ...ParameterTest.float.6.0f.Windows.Latest.cs | 10 + ...arameterTest.float.6.0f.Windows.Latest.xml | 16 + ...arameterTest.float.6.0f.Windows.Preview.cs | 10 + ...rameterTest.float.6.0f.Windows.Preview.xml | 16 + ...onalParameterTest.int.3.Unix.Compatible.cs | 10 + ...nalParameterTest.int.3.Unix.Compatible.xml | 16 + ...ptionalParameterTest.int.3.Unix.Default.cs | 10 + ...tionalParameterTest.int.3.Unix.Default.xml | 16 + ...OptionalParameterTest.int.3.Unix.Latest.cs | 10 + ...ptionalParameterTest.int.3.Unix.Latest.xml | 16 + ...ptionalParameterTest.int.3.Unix.Preview.cs | 10 + ...tionalParameterTest.int.3.Unix.Preview.xml | 16 + ...lParameterTest.int.3.Windows.Compatible.cs | 10 + ...ParameterTest.int.3.Windows.Compatible.xml | 16 + ...onalParameterTest.int.3.Windows.Default.cs | 10 + ...nalParameterTest.int.3.Windows.Default.xml | 16 + ...ionalParameterTest.int.3.Windows.Latest.cs | 10 + ...onalParameterTest.int.3.Windows.Latest.xml | 16 + ...onalParameterTest.int.3.Windows.Preview.cs | 10 + ...nalParameterTest.int.3.Windows.Preview.xml | 16 + ...rameterTest.long long.4.Unix.Compatible.cs | 10 + ...ameterTest.long long.4.Unix.Compatible.xml | 16 + ...lParameterTest.long long.4.Unix.Default.cs | 10 + ...ParameterTest.long long.4.Unix.Default.xml | 16 + ...alParameterTest.long long.4.Unix.Latest.cs | 10 + ...lParameterTest.long long.4.Unix.Latest.xml | 16 + ...lParameterTest.long long.4.Unix.Preview.cs | 10 + ...ParameterTest.long long.4.Unix.Preview.xml | 16 + ...eterTest.long long.4.Windows.Compatible.cs | 10 + ...terTest.long long.4.Windows.Compatible.xml | 16 + ...rameterTest.long long.4.Windows.Default.cs | 10 + ...ameterTest.long long.4.Windows.Default.xml | 16 + ...arameterTest.long long.4.Windows.Latest.cs | 10 + ...rameterTest.long long.4.Windows.Latest.xml | 16 + ...rameterTest.long long.4.Windows.Preview.cs | 10 + ...ameterTest.long long.4.Windows.Preview.xml | 16 + ...alParameterTest.short.2.Unix.Compatible.cs | 10 + ...lParameterTest.short.2.Unix.Compatible.xml | 16 + ...ionalParameterTest.short.2.Unix.Default.cs | 10 + ...onalParameterTest.short.2.Unix.Default.xml | 16 + ...tionalParameterTest.short.2.Unix.Latest.cs | 10 + ...ionalParameterTest.short.2.Unix.Latest.xml | 16 + ...ionalParameterTest.short.2.Unix.Preview.cs | 10 + ...onalParameterTest.short.2.Unix.Preview.xml | 16 + ...arameterTest.short.2.Windows.Compatible.cs | 10 + ...rameterTest.short.2.Windows.Compatible.xml | 16 + ...alParameterTest.short.2.Windows.Default.cs | 10 + ...lParameterTest.short.2.Windows.Default.xml | 16 + ...nalParameterTest.short.2.Windows.Latest.cs | 10 + ...alParameterTest.short.2.Windows.Latest.xml | 16 + ...alParameterTest.short.2.Windows.Preview.cs | 10 + ...lParameterTest.short.2.Windows.Preview.xml | 16 + ...meterTest.signed char.5.Unix.Compatible.cs | 10 + ...eterTest.signed char.5.Unix.Compatible.xml | 16 + ...arameterTest.signed char.5.Unix.Default.cs | 10 + ...rameterTest.signed char.5.Unix.Default.xml | 16 + ...ParameterTest.signed char.5.Unix.Latest.cs | 10 + ...arameterTest.signed char.5.Unix.Latest.xml | 16 + ...arameterTest.signed char.5.Unix.Preview.cs | 10 + ...rameterTest.signed char.5.Unix.Preview.xml | 16 + ...erTest.signed char.5.Windows.Compatible.cs | 10 + ...rTest.signed char.5.Windows.Compatible.xml | 16 + ...meterTest.signed char.5.Windows.Default.cs | 10 + ...eterTest.signed char.5.Windows.Default.xml | 16 + ...ameterTest.signed char.5.Windows.Latest.cs | 10 + ...meterTest.signed char.5.Windows.Latest.xml | 16 + ...meterTest.signed char.5.Windows.Preview.cs | 10 + ...eterTest.signed char.5.Windows.Preview.xml | 16 + ...terTest.unsigned char.0.Unix.Compatible.cs | 10 + ...erTest.unsigned char.0.Unix.Compatible.xml | 16 + ...ameterTest.unsigned char.0.Unix.Default.cs | 10 + ...meterTest.unsigned char.0.Unix.Default.xml | 16 + ...rameterTest.unsigned char.0.Unix.Latest.cs | 10 + ...ameterTest.unsigned char.0.Unix.Latest.xml | 16 + ...ameterTest.unsigned char.0.Unix.Preview.cs | 10 + ...meterTest.unsigned char.0.Unix.Preview.xml | 16 + ...Test.unsigned char.0.Windows.Compatible.cs | 10 + ...est.unsigned char.0.Windows.Compatible.xml | 16 + ...terTest.unsigned char.0.Windows.Default.cs | 10 + ...erTest.unsigned char.0.Windows.Default.xml | 16 + ...eterTest.unsigned char.0.Windows.Latest.cs | 10 + ...terTest.unsigned char.0.Windows.Latest.xml | 16 + ...terTest.unsigned char.0.Windows.Preview.cs | 10 + ...erTest.unsigned char.0.Windows.Preview.xml | 16 + ...eterTest.unsigned int.8.Unix.Compatible.cs | 10 + ...terTest.unsigned int.8.Unix.Compatible.xml | 16 + ...rameterTest.unsigned int.8.Unix.Default.cs | 10 + ...ameterTest.unsigned int.8.Unix.Default.xml | 16 + ...arameterTest.unsigned int.8.Unix.Latest.cs | 10 + ...rameterTest.unsigned int.8.Unix.Latest.xml | 16 + ...rameterTest.unsigned int.8.Unix.Preview.cs | 10 + ...ameterTest.unsigned int.8.Unix.Preview.xml | 16 + ...rTest.unsigned int.8.Windows.Compatible.cs | 10 + ...Test.unsigned int.8.Windows.Compatible.xml | 16 + ...eterTest.unsigned int.8.Windows.Default.cs | 10 + ...terTest.unsigned int.8.Windows.Default.xml | 16 + ...meterTest.unsigned int.8.Windows.Latest.cs | 10 + ...eterTest.unsigned int.8.Windows.Latest.xml | 16 + ...eterTest.unsigned int.8.Windows.Preview.cs | 10 + ...terTest.unsigned int.8.Windows.Preview.xml | 16 + ...st.unsigned long long.9.Unix.Compatible.cs | 10 + ...t.unsigned long long.9.Unix.Compatible.xml | 16 + ...rTest.unsigned long long.9.Unix.Default.cs | 10 + ...Test.unsigned long long.9.Unix.Default.xml | 16 + ...erTest.unsigned long long.9.Unix.Latest.cs | 10 + ...rTest.unsigned long long.9.Unix.Latest.xml | 16 + ...rTest.unsigned long long.9.Unix.Preview.cs | 10 + ...Test.unsigned long long.9.Unix.Preview.xml | 16 + ...unsigned long long.9.Windows.Compatible.cs | 10 + ...nsigned long long.9.Windows.Compatible.xml | 16 + ...st.unsigned long long.9.Windows.Default.cs | 10 + ...t.unsigned long long.9.Windows.Default.xml | 16 + ...est.unsigned long long.9.Windows.Latest.cs | 10 + ...st.unsigned long long.9.Windows.Latest.xml | 16 + ...st.unsigned long long.9.Windows.Preview.cs | 10 + ...t.unsigned long long.9.Windows.Preview.xml | 16 + ...Test.unsigned short.'A'.Unix.Compatible.cs | 10 + ...est.unsigned short.'A'.Unix.Compatible.xml | 16 + ...terTest.unsigned short.'A'.Unix.Default.cs | 10 + ...erTest.unsigned short.'A'.Unix.Default.xml | 16 + ...eterTest.unsigned short.'A'.Unix.Latest.cs | 10 + ...terTest.unsigned short.'A'.Unix.Latest.xml | 16 + ...terTest.unsigned short.'A'.Unix.Preview.cs | 10 + ...erTest.unsigned short.'A'.Unix.Preview.xml | 16 + ...t.unsigned short.'A'.Windows.Compatible.cs | 10 + ....unsigned short.'A'.Windows.Compatible.xml | 16 + ...Test.unsigned short.'A'.Windows.Default.cs | 10 + ...est.unsigned short.'A'.Windows.Default.xml | 16 + ...rTest.unsigned short.'A'.Windows.Latest.cs | 10 + ...Test.unsigned short.'A'.Windows.Latest.xml | 16 + ...Test.unsigned short.'A'.Windows.Preview.cs | 10 + ...est.unsigned short.'A'.Windows.Preview.xml | 16 + ...erTest.unsigned short.7.Unix.Compatible.cs | 10 + ...rTest.unsigned short.7.Unix.Compatible.xml | 16 + ...meterTest.unsigned short.7.Unix.Default.cs | 10 + ...eterTest.unsigned short.7.Unix.Default.xml | 16 + ...ameterTest.unsigned short.7.Unix.Latest.cs | 10 + ...meterTest.unsigned short.7.Unix.Latest.xml | 16 + ...meterTest.unsigned short.7.Unix.Preview.cs | 10 + ...eterTest.unsigned short.7.Unix.Preview.xml | 16 + ...est.unsigned short.7.Windows.Compatible.cs | 10 + ...st.unsigned short.7.Windows.Compatible.xml | 16 + ...erTest.unsigned short.7.Windows.Default.cs | 10 + ...rTest.unsigned short.7.Windows.Default.xml | 16 + ...terTest.unsigned short.7.Windows.Latest.cs | 10 + ...erTest.unsigned short.7.Windows.Latest.xml | 16 + ...erTest.unsigned short.7.Windows.Preview.cs | 10 + ...rTest.unsigned short.7.Windows.Preview.xml | 16 + ...UnsafeTest.void __ast.0.Unix.Compatible.cs | 10 + ...nsafeTest.void __ast.0.Unix.Compatible.xml | 16 + ...terUnsafeTest.void __ast.0.Unix.Default.cs | 10 + ...erUnsafeTest.void __ast.0.Unix.Default.xml | 16 + ...eterUnsafeTest.void __ast.0.Unix.Latest.cs | 10 + ...terUnsafeTest.void __ast.0.Unix.Latest.xml | 16 + ...terUnsafeTest.void __ast.0.Unix.Preview.cs | 10 + ...erUnsafeTest.void __ast.0.Unix.Preview.xml | 16 + ...afeTest.void __ast.0.Windows.Compatible.cs | 10 + ...feTest.void __ast.0.Windows.Compatible.xml | 16 + ...UnsafeTest.void __ast.0.Windows.Default.cs | 10 + ...nsafeTest.void __ast.0.Windows.Default.xml | 16 + ...rUnsafeTest.void __ast.0.Windows.Latest.cs | 10 + ...UnsafeTest.void __ast.0.Windows.Latest.xml | 16 + ...UnsafeTest.void __ast.0.Windows.Preview.cs | 10 + ...nsafeTest.void __ast.0.Windows.Preview.xml | 16 + ...Test.void __ast.nullptr.Unix.Compatible.cs | 10 + ...est.void __ast.nullptr.Unix.Compatible.xml | 16 + ...afeTest.void __ast.nullptr.Unix.Default.cs | 10 + ...feTest.void __ast.nullptr.Unix.Default.xml | 16 + ...safeTest.void __ast.nullptr.Unix.Latest.cs | 10 + ...afeTest.void __ast.nullptr.Unix.Latest.xml | 16 + ...afeTest.void __ast.nullptr.Unix.Preview.cs | 10 + ...feTest.void __ast.nullptr.Unix.Preview.xml | 16 + ...t.void __ast.nullptr.Windows.Compatible.cs | 10 + ....void __ast.nullptr.Windows.Compatible.xml | 16 + ...Test.void __ast.nullptr.Windows.Default.cs | 10 + ...est.void __ast.nullptr.Windows.Default.xml | 16 + ...eTest.void __ast.nullptr.Windows.Latest.cs | 10 + ...Test.void __ast.nullptr.Windows.Latest.xml | 16 + ...Test.void __ast.nullptr.Windows.Preview.cs | 10 + ...est.void __ast.nullptr.Windows.Preview.xml | 16 + ...Test.SourceLocationTest.Unix.Compatible.cs | 11 + ...est.SourceLocationTest.Unix.Compatible.xml | 13 + ...ortTest.SourceLocationTest.Unix.Default.cs | 11 + ...rtTest.SourceLocationTest.Unix.Default.xml | 13 + ...portTest.SourceLocationTest.Unix.Latest.cs | 11 + ...ortTest.SourceLocationTest.Unix.Latest.xml | 13 + ...ortTest.SourceLocationTest.Unix.Preview.cs | 11 + ...rtTest.SourceLocationTest.Unix.Preview.xml | 13 + ...t.SourceLocationTest.Windows.Compatible.cs | 11 + ....SourceLocationTest.Windows.Compatible.xml | 13 + ...Test.SourceLocationTest.Windows.Default.cs | 11 + ...est.SourceLocationTest.Windows.Default.xml | 13 + ...tTest.SourceLocationTest.Windows.Latest.cs | 11 + ...Test.SourceLocationTest.Windows.Latest.xml | 13 + ...Test.SourceLocationTest.Windows.Preview.cs | 11 + ...est.SourceLocationTest.Windows.Preview.xml | 13 + ...Test.TemplateMemberTest.Unix.Compatible.cs | 10 + ...est.TemplateMemberTest.Unix.Compatible.xml | 10 + ...ortTest.TemplateMemberTest.Unix.Default.cs | 10 + ...rtTest.TemplateMemberTest.Unix.Default.xml | 10 + ...portTest.TemplateMemberTest.Unix.Latest.cs | 10 + ...ortTest.TemplateMemberTest.Unix.Latest.xml | 10 + ...ortTest.TemplateMemberTest.Unix.Preview.cs | 10 + ...rtTest.TemplateMemberTest.Unix.Preview.xml | 10 + ...t.TemplateMemberTest.Windows.Compatible.cs | 10 + ....TemplateMemberTest.Windows.Compatible.xml | 10 + ...Test.TemplateMemberTest.Windows.Default.cs | 10 + ...est.TemplateMemberTest.Windows.Default.xml | 10 + ...tTest.TemplateMemberTest.Windows.Latest.cs | 10 + ...Test.TemplateMemberTest.Windows.Latest.xml | 10 + ...Test.TemplateMemberTest.Windows.Preview.cs | 10 + ...est.TemplateMemberTest.Windows.Preview.xml | 10 + ...plateParameterTest.bool.Unix.Compatible.cs | 10 + ...lateParameterTest.bool.Unix.Compatible.xml | 13 + ...TemplateParameterTest.bool.Unix.Default.cs | 10 + ...emplateParameterTest.bool.Unix.Default.xml | 13 + ....TemplateParameterTest.bool.Unix.Latest.cs | 10 + ...TemplateParameterTest.bool.Unix.Latest.xml | 13 + ...TemplateParameterTest.bool.Unix.Preview.cs | 10 + ...emplateParameterTest.bool.Unix.Preview.xml | 13 + ...teParameterTest.bool.Windows.Compatible.cs | 10 + ...eParameterTest.bool.Windows.Compatible.xml | 13 + ...plateParameterTest.bool.Windows.Default.cs | 10 + ...lateParameterTest.bool.Windows.Default.xml | 13 + ...mplateParameterTest.bool.Windows.Latest.cs | 10 + ...plateParameterTest.bool.Windows.Latest.xml | 13 + ...plateParameterTest.bool.Windows.Preview.cs | 10 + ...lateParameterTest.bool.Windows.Preview.xml | 13 + ...rameterTest.float __ast.Unix.Compatible.cs | 11 + ...ameterTest.float __ast.Unix.Compatible.xml | 13 + ...eParameterTest.float __ast.Unix.Default.cs | 11 + ...ParameterTest.float __ast.Unix.Default.xml | 13 + ...teParameterTest.float __ast.Unix.Latest.cs | 11 + ...eParameterTest.float __ast.Unix.Latest.xml | 13 + ...eParameterTest.float __ast.Unix.Preview.cs | 11 + ...ParameterTest.float __ast.Unix.Preview.xml | 13 + ...eterTest.float __ast.Windows.Compatible.cs | 11 + ...terTest.float __ast.Windows.Compatible.xml | 13 + ...rameterTest.float __ast.Windows.Default.cs | 11 + ...ameterTest.float __ast.Windows.Default.xml | 13 + ...arameterTest.float __ast.Windows.Latest.cs | 11 + ...rameterTest.float __ast.Windows.Latest.xml | 13 + ...rameterTest.float __ast.Windows.Preview.cs | 11 + ...ameterTest.float __ast.Windows.Preview.xml | 13 + ...mplateParameterTest.int.Unix.Compatible.cs | 10 + ...plateParameterTest.int.Unix.Compatible.xml | 13 + ....TemplateParameterTest.int.Unix.Default.cs | 10 + ...TemplateParameterTest.int.Unix.Default.xml | 13 + ...t.TemplateParameterTest.int.Unix.Latest.cs | 10 + ....TemplateParameterTest.int.Unix.Latest.xml | 13 + ....TemplateParameterTest.int.Unix.Preview.cs | 10 + ...TemplateParameterTest.int.Unix.Preview.xml | 13 + ...ateParameterTest.int.Windows.Compatible.cs | 10 + ...teParameterTest.int.Windows.Compatible.xml | 13 + ...mplateParameterTest.int.Windows.Default.cs | 10 + ...plateParameterTest.int.Windows.Default.xml | 13 + ...emplateParameterTest.int.Windows.Latest.cs | 10 + ...mplateParameterTest.int.Windows.Latest.xml | 13 + ...mplateParameterTest.int.Windows.Preview.cs | 10 + ...plateParameterTest.int.Windows.Preview.xml | 13 + ...rTest.void (__ast)(int).Unix.Compatible.cs | 11 + ...Test.void (__ast)(int).Unix.Compatible.xml | 13 + ...eterTest.void (__ast)(int).Unix.Default.cs | 11 + ...terTest.void (__ast)(int).Unix.Default.xml | 13 + ...meterTest.void (__ast)(int).Unix.Latest.cs | 11 + ...eterTest.void (__ast)(int).Unix.Latest.xml | 13 + ...eterTest.void (__ast)(int).Unix.Preview.cs | 11 + ...terTest.void (__ast)(int).Unix.Preview.xml | 13 + ...st.void (__ast)(int).Windows.Compatible.cs | 11 + ...t.void (__ast)(int).Windows.Compatible.xml | 13 + ...rTest.void (__ast)(int).Windows.Default.cs | 11 + ...Test.void (__ast)(int).Windows.Default.xml | 13 + ...erTest.void (__ast)(int).Windows.Latest.cs | 11 + ...rTest.void (__ast)(int).Windows.Latest.xml | 13 + ...rTest.void (__ast)(int).Windows.Preview.cs | 11 + ...Test.void (__ast)(int).Windows.Preview.xml | 13 + ...allConvStarOverrideTest.Unix.Compatible.cs | 13 + ...llConvStarOverrideTest.Unix.Compatible.xml | 19 + ...thCallConvStarOverrideTest.Unix.Default.cs | 13 + ...hCallConvStarOverrideTest.Unix.Default.xml | 19 + ...ithCallConvStarOverrideTest.Unix.Latest.cs | 13 + ...thCallConvStarOverrideTest.Unix.Latest.xml | 19 + ...thCallConvStarOverrideTest.Unix.Preview.cs | 13 + ...hCallConvStarOverrideTest.Unix.Preview.xml | 19 + ...ConvStarOverrideTest.Windows.Compatible.cs | 13 + ...onvStarOverrideTest.Windows.Compatible.xml | 19 + ...allConvStarOverrideTest.Windows.Default.cs | 13 + ...llConvStarOverrideTest.Windows.Default.xml | 19 + ...CallConvStarOverrideTest.Windows.Latest.cs | 13 + ...allConvStarOverrideTest.Windows.Latest.xml | 19 + ...allConvStarOverrideTest.Windows.Preview.cs | 13 + ...llConvStarOverrideTest.Windows.Preview.xml | 19 + ...st.WithCallConvStarTest.Unix.Compatible.cs | 13 + ...t.WithCallConvStarTest.Unix.Compatible.xml | 19 + ...tTest.WithCallConvStarTest.Unix.Default.cs | 13 + ...Test.WithCallConvStarTest.Unix.Default.xml | 19 + ...rtTest.WithCallConvStarTest.Unix.Latest.cs | 13 + ...tTest.WithCallConvStarTest.Unix.Latest.xml | 19 + ...tTest.WithCallConvStarTest.Unix.Preview.cs | 13 + ...Test.WithCallConvStarTest.Unix.Preview.xml | 19 + ...WithCallConvStarTest.Windows.Compatible.cs | 13 + ...ithCallConvStarTest.Windows.Compatible.xml | 19 + ...st.WithCallConvStarTest.Windows.Default.cs | 13 + ...t.WithCallConvStarTest.Windows.Default.xml | 19 + ...est.WithCallConvStarTest.Windows.Latest.cs | 13 + ...st.WithCallConvStarTest.Windows.Latest.xml | 19 + ...st.WithCallConvStarTest.Windows.Preview.cs | 13 + ...t.WithCallConvStarTest.Windows.Preview.xml | 19 + ...rtTest.WithCallConvTest.Unix.Compatible.cs | 13 + ...tTest.WithCallConvTest.Unix.Compatible.xml | 19 + ...mportTest.WithCallConvTest.Unix.Default.cs | 13 + ...portTest.WithCallConvTest.Unix.Default.xml | 19 + ...ImportTest.WithCallConvTest.Unix.Latest.cs | 13 + ...mportTest.WithCallConvTest.Unix.Latest.xml | 19 + ...mportTest.WithCallConvTest.Unix.Preview.cs | 13 + ...portTest.WithCallConvTest.Unix.Preview.xml | 19 + ...est.WithCallConvTest.Windows.Compatible.cs | 13 + ...st.WithCallConvTest.Windows.Compatible.xml | 19 + ...rtTest.WithCallConvTest.Windows.Default.cs | 13 + ...tTest.WithCallConvTest.Windows.Default.xml | 19 + ...ortTest.WithCallConvTest.Windows.Latest.cs | 13 + ...rtTest.WithCallConvTest.Windows.Latest.xml | 19 + ...rtTest.WithCallConvTest.Windows.Preview.cs | 13 + ...tTest.WithCallConvTest.Windows.Preview.xml | 19 + ...WithLibraryPathStarTest.Unix.Compatible.cs | 10 + ...ithLibraryPathStarTest.Unix.Compatible.xml | 10 + ...st.WithLibraryPathStarTest.Unix.Default.cs | 10 + ...t.WithLibraryPathStarTest.Unix.Default.xml | 10 + ...est.WithLibraryPathStarTest.Unix.Latest.cs | 10 + ...st.WithLibraryPathStarTest.Unix.Latest.xml | 10 + ...st.WithLibraryPathStarTest.Unix.Preview.cs | 10 + ...t.WithLibraryPathStarTest.Unix.Preview.xml | 10 + ...hLibraryPathStarTest.Windows.Compatible.cs | 10 + ...LibraryPathStarTest.Windows.Compatible.xml | 10 + ...WithLibraryPathStarTest.Windows.Default.cs | 10 + ...ithLibraryPathStarTest.Windows.Default.xml | 10 + ....WithLibraryPathStarTest.Windows.Latest.cs | 10 + ...WithLibraryPathStarTest.Windows.Latest.xml | 10 + ...WithLibraryPathStarTest.Windows.Preview.cs | 10 + ...ithLibraryPathStarTest.Windows.Preview.xml | 10 + ...est.WithLibraryPathTest.Unix.Compatible.cs | 10 + ...st.WithLibraryPathTest.Unix.Compatible.xml | 10 + ...rtTest.WithLibraryPathTest.Unix.Default.cs | 10 + ...tTest.WithLibraryPathTest.Unix.Default.xml | 10 + ...ortTest.WithLibraryPathTest.Unix.Latest.cs | 10 + ...rtTest.WithLibraryPathTest.Unix.Latest.xml | 10 + ...rtTest.WithLibraryPathTest.Unix.Preview.cs | 10 + ...tTest.WithLibraryPathTest.Unix.Preview.xml | 10 + ....WithLibraryPathTest.Windows.Compatible.cs | 10 + ...WithLibraryPathTest.Windows.Compatible.xml | 10 + ...est.WithLibraryPathTest.Windows.Default.cs | 10 + ...st.WithLibraryPathTest.Windows.Default.xml | 10 + ...Test.WithLibraryPathTest.Windows.Latest.cs | 10 + ...est.WithLibraryPathTest.Windows.Latest.xml | 10 + ...est.WithLibraryPathTest.Windows.Preview.cs | 10 + ...st.WithLibraryPathTest.Windows.Preview.xml | 10 + ...ithSetLastErrorStarTest.Unix.Compatible.cs | 13 + ...thSetLastErrorStarTest.Unix.Compatible.xml | 19 + ...t.WithSetLastErrorStarTest.Unix.Default.cs | 13 + ....WithSetLastErrorStarTest.Unix.Default.xml | 19 + ...st.WithSetLastErrorStarTest.Unix.Latest.cs | 13 + ...t.WithSetLastErrorStarTest.Unix.Latest.xml | 19 + ...t.WithSetLastErrorStarTest.Unix.Preview.cs | 13 + ....WithSetLastErrorStarTest.Unix.Preview.xml | 19 + ...SetLastErrorStarTest.Windows.Compatible.cs | 13 + ...etLastErrorStarTest.Windows.Compatible.xml | 19 + ...ithSetLastErrorStarTest.Windows.Default.cs | 13 + ...thSetLastErrorStarTest.Windows.Default.xml | 19 + ...WithSetLastErrorStarTest.Windows.Latest.cs | 13 + ...ithSetLastErrorStarTest.Windows.Latest.xml | 19 + ...ithSetLastErrorStarTest.Windows.Preview.cs | 13 + ...thSetLastErrorStarTest.Windows.Preview.xml | 19 + ...st.WithSetLastErrorTest.Unix.Compatible.cs | 13 + ...t.WithSetLastErrorTest.Unix.Compatible.xml | 19 + ...tTest.WithSetLastErrorTest.Unix.Default.cs | 13 + ...Test.WithSetLastErrorTest.Unix.Default.xml | 19 + ...rtTest.WithSetLastErrorTest.Unix.Latest.cs | 13 + ...tTest.WithSetLastErrorTest.Unix.Latest.xml | 19 + ...tTest.WithSetLastErrorTest.Unix.Preview.cs | 13 + ...Test.WithSetLastErrorTest.Unix.Preview.xml | 19 + ...WithSetLastErrorTest.Windows.Compatible.cs | 13 + ...ithSetLastErrorTest.Windows.Compatible.xml | 19 + ...st.WithSetLastErrorTest.Windows.Default.cs | 13 + ...t.WithSetLastErrorTest.Windows.Default.xml | 19 + ...est.WithSetLastErrorTest.Windows.Latest.cs | 13 + ...st.WithSetLastErrorTest.Windows.Latest.xml | 19 + ...st.WithSetLastErrorTest.Windows.Preview.cs | 13 + ...t.WithSetLastErrorTest.Windows.Preview.xml | 19 + ...clarationTest.BasicTest.Unix.Compatible.cs | 14 + ...larationTest.BasicTest.Unix.Compatible.xml | 13 + ...rDeclarationTest.BasicTest.Unix.Default.cs | 8 + ...DeclarationTest.BasicTest.Unix.Default.xml | 10 + ...erDeclarationTest.BasicTest.Unix.Latest.cs | 8 + ...rDeclarationTest.BasicTest.Unix.Latest.xml | 10 + ...rDeclarationTest.BasicTest.Unix.Preview.cs | 8 + ...DeclarationTest.BasicTest.Unix.Preview.xml | 10 + ...rationTest.BasicTest.Windows.Compatible.cs | 14 + ...ationTest.BasicTest.Windows.Compatible.xml | 13 + ...clarationTest.BasicTest.Windows.Default.cs | 8 + ...larationTest.BasicTest.Windows.Default.xml | 10 + ...eclarationTest.BasicTest.Windows.Latest.cs | 8 + ...clarationTest.BasicTest.Windows.Latest.xml | 10 + ...clarationTest.BasicTest.Windows.Preview.cs | 8 + ...larationTest.BasicTest.Windows.Preview.xml | 10 + ...rationTest.CallconvTest.Unix.Compatible.cs | 14 + ...ationTest.CallconvTest.Unix.Compatible.xml | 13 + ...clarationTest.CallconvTest.Unix.Default.cs | 8 + ...larationTest.CallconvTest.Unix.Default.xml | 10 + ...eclarationTest.CallconvTest.Unix.Latest.cs | 8 + ...clarationTest.CallconvTest.Unix.Latest.xml | 10 + ...clarationTest.CallconvTest.Unix.Preview.cs | 8 + ...larationTest.CallconvTest.Unix.Preview.xml | 10 + ...ionTest.CallconvTest.Windows.Compatible.cs | 14 + ...onTest.CallconvTest.Windows.Compatible.xml | 13 + ...rationTest.CallconvTest.Windows.Default.cs | 8 + ...ationTest.CallconvTest.Windows.Default.xml | 10 + ...arationTest.CallconvTest.Windows.Latest.cs | 8 + ...rationTest.CallconvTest.Windows.Latest.xml | 10 + ...rationTest.CallconvTest.Windows.Preview.cs | 8 + ...ationTest.CallconvTest.Windows.Preview.xml | 10 + ....PointerlessTypedefTest.Unix.Compatible.cs | 14 + ...PointerlessTypedefTest.Unix.Compatible.xml | 13 + ...est.PointerlessTypedefTest.Unix.Default.cs | 8 + ...st.PointerlessTypedefTest.Unix.Default.xml | 10 + ...Test.PointerlessTypedefTest.Unix.Latest.cs | 8 + ...est.PointerlessTypedefTest.Unix.Latest.xml | 10 + ...est.PointerlessTypedefTest.Unix.Preview.cs | 8 + ...st.PointerlessTypedefTest.Unix.Preview.xml | 10 + ...interlessTypedefTest.Windows.Compatible.cs | 14 + ...nterlessTypedefTest.Windows.Compatible.xml | 13 + ....PointerlessTypedefTest.Windows.Default.cs | 8 + ...PointerlessTypedefTest.Windows.Default.xml | 10 + ...t.PointerlessTypedefTest.Windows.Latest.cs | 8 + ....PointerlessTypedefTest.Windows.Latest.xml | 10 + ....PointerlessTypedefTest.Windows.Preview.cs | 8 + ...PointerlessTypedefTest.Windows.Preview.xml | 10 + .../OptionsTest.WithAttributes.Unix.Latest.cs | 22 + ...tionsTest.WithAttributes.Windows.Latest.cs | 22 + .../OptionsTest.WithUsings.Unix.Latest.cs | 24 + .../OptionsTest.WithUsings.Windows.Latest.cs | 24 + ...cationAttributeTest2.Windows.Compatible.cs | 15 + ...ationAttributeTest2.Windows.Compatible.xml | 16 + ...eLocationAttributeTest2.Windows.Default.cs | 15 + ...LocationAttributeTest2.Windows.Default.xml | 16 + ...ceLocationAttributeTest2.Windows.Latest.cs | 15 + ...eLocationAttributeTest2.Windows.Latest.xml | 16 + ...eLocationAttributeTest2.Windows.Preview.cs | 15 + ...LocationAttributeTest2.Windows.Preview.xml | 16 + ...onTest.BasicTest.double.Unix.Compatible.cs | 11 + ...nTest.BasicTest.double.Unix.Compatible.xml | 16 + ...ationTest.BasicTest.double.Unix.Default.cs | 11 + ...tionTest.BasicTest.double.Unix.Default.xml | 16 + ...rationTest.BasicTest.double.Unix.Latest.cs | 11 + ...ationTest.BasicTest.double.Unix.Latest.xml | 16 + ...ationTest.BasicTest.double.Unix.Preview.cs | 11 + ...tionTest.BasicTest.double.Unix.Preview.xml | 16 + ...est.BasicTest.double.Windows.Compatible.cs | 11 + ...st.BasicTest.double.Windows.Compatible.xml | 16 + ...onTest.BasicTest.double.Windows.Default.cs | 11 + ...nTest.BasicTest.double.Windows.Default.xml | 16 + ...ionTest.BasicTest.double.Windows.Latest.cs | 11 + ...onTest.BasicTest.double.Windows.Latest.xml | 16 + ...onTest.BasicTest.double.Windows.Preview.cs | 11 + ...nTest.BasicTest.double.Windows.Preview.xml | 16 + ...ionTest.BasicTest.float.Unix.Compatible.cs | 11 + ...onTest.BasicTest.float.Unix.Compatible.xml | 16 + ...rationTest.BasicTest.float.Unix.Default.cs | 11 + ...ationTest.BasicTest.float.Unix.Default.xml | 16 + ...arationTest.BasicTest.float.Unix.Latest.cs | 11 + ...rationTest.BasicTest.float.Unix.Latest.xml | 16 + ...rationTest.BasicTest.float.Unix.Preview.cs | 11 + ...ationTest.BasicTest.float.Unix.Preview.xml | 16 + ...Test.BasicTest.float.Windows.Compatible.cs | 11 + ...est.BasicTest.float.Windows.Compatible.xml | 16 + ...ionTest.BasicTest.float.Windows.Default.cs | 11 + ...onTest.BasicTest.float.Windows.Default.xml | 16 + ...tionTest.BasicTest.float.Windows.Latest.cs | 11 + ...ionTest.BasicTest.float.Windows.Latest.xml | 16 + ...ionTest.BasicTest.float.Windows.Preview.cs | 11 + ...onTest.BasicTest.float.Windows.Preview.xml | 16 + ...ationTest.BasicTest.int.Unix.Compatible.cs | 11 + ...tionTest.BasicTest.int.Unix.Compatible.xml | 16 + ...larationTest.BasicTest.int.Unix.Default.cs | 11 + ...arationTest.BasicTest.int.Unix.Default.xml | 16 + ...clarationTest.BasicTest.int.Unix.Latest.cs | 11 + ...larationTest.BasicTest.int.Unix.Latest.xml | 16 + ...larationTest.BasicTest.int.Unix.Preview.cs | 11 + ...arationTest.BasicTest.int.Unix.Preview.xml | 16 + ...onTest.BasicTest.int.Windows.Compatible.cs | 11 + ...nTest.BasicTest.int.Windows.Compatible.xml | 16 + ...ationTest.BasicTest.int.Windows.Default.cs | 11 + ...tionTest.BasicTest.int.Windows.Default.xml | 16 + ...rationTest.BasicTest.int.Windows.Latest.cs | 11 + ...ationTest.BasicTest.int.Windows.Latest.xml | 16 + ...ationTest.BasicTest.int.Windows.Preview.cs | 11 + ...tionTest.BasicTest.int.Windows.Preview.xml | 16 + ...ionTest.BasicTest.short.Unix.Compatible.cs | 11 + ...onTest.BasicTest.short.Unix.Compatible.xml | 16 + ...rationTest.BasicTest.short.Unix.Default.cs | 11 + ...ationTest.BasicTest.short.Unix.Default.xml | 16 + ...arationTest.BasicTest.short.Unix.Latest.cs | 11 + ...rationTest.BasicTest.short.Unix.Latest.xml | 16 + ...rationTest.BasicTest.short.Unix.Preview.cs | 11 + ...ationTest.BasicTest.short.Unix.Preview.xml | 16 + ...Test.BasicTest.short.Windows.Compatible.cs | 11 + ...est.BasicTest.short.Windows.Compatible.xml | 16 + ...ionTest.BasicTest.short.Windows.Default.cs | 11 + ...onTest.BasicTest.short.Windows.Default.xml | 16 + ...tionTest.BasicTest.short.Windows.Latest.cs | 11 + ...ionTest.BasicTest.short.Windows.Latest.xml | 16 + ...ionTest.BasicTest.short.Windows.Preview.cs | 11 + ...onTest.BasicTest.short.Windows.Preview.xml | 16 + ...BasicTestInCMode.double.Unix.Compatible.cs | 11 + ...asicTestInCMode.double.Unix.Compatible.xml | 16 + ...st.BasicTestInCMode.double.Unix.Default.cs | 11 + ...t.BasicTestInCMode.double.Unix.Default.xml | 16 + ...est.BasicTestInCMode.double.Unix.Latest.cs | 11 + ...st.BasicTestInCMode.double.Unix.Latest.xml | 16 + ...st.BasicTestInCMode.double.Unix.Preview.cs | 11 + ...t.BasicTestInCMode.double.Unix.Preview.xml | 16 + ...icTestInCMode.double.Windows.Compatible.cs | 11 + ...cTestInCMode.double.Windows.Compatible.xml | 16 + ...BasicTestInCMode.double.Windows.Default.cs | 11 + ...asicTestInCMode.double.Windows.Default.xml | 16 + ....BasicTestInCMode.double.Windows.Latest.cs | 11 + ...BasicTestInCMode.double.Windows.Latest.xml | 16 + ...BasicTestInCMode.double.Windows.Preview.cs | 11 + ...asicTestInCMode.double.Windows.Preview.xml | 16 + ....BasicTestInCMode.float.Unix.Compatible.cs | 11 + ...BasicTestInCMode.float.Unix.Compatible.xml | 16 + ...est.BasicTestInCMode.float.Unix.Default.cs | 11 + ...st.BasicTestInCMode.float.Unix.Default.xml | 16 + ...Test.BasicTestInCMode.float.Unix.Latest.cs | 11 + ...est.BasicTestInCMode.float.Unix.Latest.xml | 16 + ...est.BasicTestInCMode.float.Unix.Preview.cs | 11 + ...st.BasicTestInCMode.float.Unix.Preview.xml | 16 + ...sicTestInCMode.float.Windows.Compatible.cs | 11 + ...icTestInCMode.float.Windows.Compatible.xml | 16 + ....BasicTestInCMode.float.Windows.Default.cs | 11 + ...BasicTestInCMode.float.Windows.Default.xml | 16 + ...t.BasicTestInCMode.float.Windows.Latest.cs | 11 + ....BasicTestInCMode.float.Windows.Latest.xml | 16 + ....BasicTestInCMode.float.Windows.Preview.cs | 11 + ...BasicTestInCMode.float.Windows.Preview.xml | 16 + ...st.BasicTestInCMode.int.Unix.Compatible.cs | 11 + ...t.BasicTestInCMode.int.Unix.Compatible.xml | 16 + ...nTest.BasicTestInCMode.int.Unix.Default.cs | 11 + ...Test.BasicTestInCMode.int.Unix.Default.xml | 16 + ...onTest.BasicTestInCMode.int.Unix.Latest.cs | 11 + ...nTest.BasicTestInCMode.int.Unix.Latest.xml | 16 + ...nTest.BasicTestInCMode.int.Unix.Preview.cs | 11 + ...Test.BasicTestInCMode.int.Unix.Preview.xml | 16 + ...BasicTestInCMode.int.Windows.Compatible.cs | 11 + ...asicTestInCMode.int.Windows.Compatible.xml | 16 + ...st.BasicTestInCMode.int.Windows.Default.cs | 11 + ...t.BasicTestInCMode.int.Windows.Default.xml | 16 + ...est.BasicTestInCMode.int.Windows.Latest.cs | 11 + ...st.BasicTestInCMode.int.Windows.Latest.xml | 16 + ...st.BasicTestInCMode.int.Windows.Preview.cs | 11 + ...t.BasicTestInCMode.int.Windows.Preview.xml | 16 + ....BasicTestInCMode.short.Unix.Compatible.cs | 11 + ...BasicTestInCMode.short.Unix.Compatible.xml | 16 + ...est.BasicTestInCMode.short.Unix.Default.cs | 11 + ...st.BasicTestInCMode.short.Unix.Default.xml | 16 + ...Test.BasicTestInCMode.short.Unix.Latest.cs | 11 + ...est.BasicTestInCMode.short.Unix.Latest.xml | 16 + ...est.BasicTestInCMode.short.Unix.Preview.cs | 11 + ...st.BasicTestInCMode.short.Unix.Preview.xml | 16 + ...sicTestInCMode.short.Windows.Compatible.cs | 11 + ...icTestInCMode.short.Windows.Compatible.xml | 16 + ....BasicTestInCMode.short.Windows.Default.cs | 11 + ...BasicTestInCMode.short.Windows.Default.xml | 16 + ...t.BasicTestInCMode.short.Windows.Latest.cs | 11 + ....BasicTestInCMode.short.Windows.Latest.xml | 16 + ....BasicTestInCMode.short.Windows.Preview.cs | 11 + ...BasicTestInCMode.short.Windows.Preview.xml | 16 + ...NativeTypeNameTest.bool.Unix.Compatible.cs | 14 + ...ativeTypeNameTest.bool.Unix.Compatible.xml | 16 + ...ithNativeTypeNameTest.bool.Unix.Default.cs | 14 + ...thNativeTypeNameTest.bool.Unix.Default.xml | 16 + ...WithNativeTypeNameTest.bool.Unix.Latest.cs | 14 + ...ithNativeTypeNameTest.bool.Unix.Latest.xml | 16 + ...ithNativeTypeNameTest.bool.Unix.Preview.cs | 14 + ...thNativeTypeNameTest.bool.Unix.Preview.xml | 16 + ...iveTypeNameTest.bool.Windows.Compatible.cs | 14 + ...veTypeNameTest.bool.Windows.Compatible.xml | 16 + ...NativeTypeNameTest.bool.Windows.Default.cs | 14 + ...ativeTypeNameTest.bool.Windows.Default.xml | 16 + ...hNativeTypeNameTest.bool.Windows.Latest.cs | 14 + ...NativeTypeNameTest.bool.Windows.Latest.xml | 16 + ...NativeTypeNameTest.bool.Windows.Preview.cs | 14 + ...ativeTypeNameTest.bool.Windows.Preview.xml | 16 + ...eTypeNameTest.long long.Unix.Compatible.cs | 14 + ...TypeNameTest.long long.Unix.Compatible.xml | 16 + ...tiveTypeNameTest.long long.Unix.Default.cs | 14 + ...iveTypeNameTest.long long.Unix.Default.xml | 16 + ...ativeTypeNameTest.long long.Unix.Latest.cs | 14 + ...tiveTypeNameTest.long long.Unix.Latest.xml | 16 + ...tiveTypeNameTest.long long.Unix.Preview.cs | 14 + ...iveTypeNameTest.long long.Unix.Preview.xml | 16 + ...peNameTest.long long.Windows.Compatible.cs | 14 + ...eNameTest.long long.Windows.Compatible.xml | 16 + ...eTypeNameTest.long long.Windows.Default.cs | 14 + ...TypeNameTest.long long.Windows.Default.xml | 16 + ...veTypeNameTest.long long.Windows.Latest.cs | 14 + ...eTypeNameTest.long long.Windows.Latest.xml | 16 + ...eTypeNameTest.long long.Windows.Preview.cs | 14 + ...TypeNameTest.long long.Windows.Preview.xml | 16 + ...ypeNameTest.signed char.Unix.Compatible.cs | 14 + ...peNameTest.signed char.Unix.Compatible.xml | 16 + ...veTypeNameTest.signed char.Unix.Default.cs | 14 + ...eTypeNameTest.signed char.Unix.Default.xml | 16 + ...iveTypeNameTest.signed char.Unix.Latest.cs | 14 + ...veTypeNameTest.signed char.Unix.Latest.xml | 16 + ...veTypeNameTest.signed char.Unix.Preview.cs | 14 + ...eTypeNameTest.signed char.Unix.Preview.xml | 16 + ...NameTest.signed char.Windows.Compatible.cs | 14 + ...ameTest.signed char.Windows.Compatible.xml | 16 + ...ypeNameTest.signed char.Windows.Default.cs | 14 + ...peNameTest.signed char.Windows.Default.xml | 16 + ...TypeNameTest.signed char.Windows.Latest.cs | 14 + ...ypeNameTest.signed char.Windows.Latest.xml | 16 + ...ypeNameTest.signed char.Windows.Preview.cs | 14 + ...peNameTest.signed char.Windows.Preview.xml | 16 + ...eNameTest.unsigned char.Unix.Compatible.cs | 14 + ...NameTest.unsigned char.Unix.Compatible.xml | 16 + ...TypeNameTest.unsigned char.Unix.Default.cs | 14 + ...ypeNameTest.unsigned char.Unix.Default.xml | 16 + ...eTypeNameTest.unsigned char.Unix.Latest.cs | 14 + ...TypeNameTest.unsigned char.Unix.Latest.xml | 16 + ...TypeNameTest.unsigned char.Unix.Preview.cs | 14 + ...ypeNameTest.unsigned char.Unix.Preview.xml | 16 + ...meTest.unsigned char.Windows.Compatible.cs | 14 + ...eTest.unsigned char.Windows.Compatible.xml | 16 + ...eNameTest.unsigned char.Windows.Default.cs | 14 + ...NameTest.unsigned char.Windows.Default.xml | 16 + ...peNameTest.unsigned char.Windows.Latest.cs | 14 + ...eNameTest.unsigned char.Windows.Latest.xml | 16 + ...eNameTest.unsigned char.Windows.Preview.cs | 14 + ...NameTest.unsigned char.Windows.Preview.xml | 16 + ...peNameTest.unsigned int.Unix.Compatible.cs | 14 + ...eNameTest.unsigned int.Unix.Compatible.xml | 16 + ...eTypeNameTest.unsigned int.Unix.Default.cs | 14 + ...TypeNameTest.unsigned int.Unix.Default.xml | 16 + ...veTypeNameTest.unsigned int.Unix.Latest.cs | 14 + ...eTypeNameTest.unsigned int.Unix.Latest.xml | 16 + ...eTypeNameTest.unsigned int.Unix.Preview.cs | 14 + ...TypeNameTest.unsigned int.Unix.Preview.xml | 16 + ...ameTest.unsigned int.Windows.Compatible.cs | 14 + ...meTest.unsigned int.Windows.Compatible.xml | 16 + ...peNameTest.unsigned int.Windows.Default.cs | 14 + ...eNameTest.unsigned int.Windows.Default.xml | 16 + ...ypeNameTest.unsigned int.Windows.Latest.cs | 14 + ...peNameTest.unsigned int.Windows.Latest.xml | 16 + ...peNameTest.unsigned int.Windows.Preview.cs | 14 + ...eNameTest.unsigned int.Windows.Preview.xml | 16 + ...Test.unsigned long long.Unix.Compatible.cs | 14 + ...est.unsigned long long.Unix.Compatible.xml | 16 + ...ameTest.unsigned long long.Unix.Default.cs | 14 + ...meTest.unsigned long long.Unix.Default.xml | 16 + ...NameTest.unsigned long long.Unix.Latest.cs | 14 + ...ameTest.unsigned long long.Unix.Latest.xml | 16 + ...ameTest.unsigned long long.Unix.Preview.cs | 14 + ...meTest.unsigned long long.Unix.Preview.xml | 16 + ...t.unsigned long long.Windows.Compatible.cs | 14 + ....unsigned long long.Windows.Compatible.xml | 16 + ...Test.unsigned long long.Windows.Default.cs | 14 + ...est.unsigned long long.Windows.Default.xml | 16 + ...eTest.unsigned long long.Windows.Latest.cs | 14 + ...Test.unsigned long long.Windows.Latest.xml | 16 + ...Test.unsigned long long.Windows.Preview.cs | 14 + ...est.unsigned long long.Windows.Preview.xml | 16 + ...NameTest.unsigned short.Unix.Compatible.cs | 14 + ...ameTest.unsigned short.Unix.Compatible.xml | 16 + ...ypeNameTest.unsigned short.Unix.Default.cs | 14 + ...peNameTest.unsigned short.Unix.Default.xml | 16 + ...TypeNameTest.unsigned short.Unix.Latest.cs | 14 + ...ypeNameTest.unsigned short.Unix.Latest.xml | 16 + ...ypeNameTest.unsigned short.Unix.Preview.cs | 14 + ...peNameTest.unsigned short.Unix.Preview.xml | 16 + ...eTest.unsigned short.Windows.Compatible.cs | 14 + ...Test.unsigned short.Windows.Compatible.xml | 16 + ...NameTest.unsigned short.Windows.Default.cs | 14 + ...ameTest.unsigned short.Windows.Default.xml | 16 + ...eNameTest.unsigned short.Windows.Latest.cs | 14 + ...NameTest.unsigned short.Windows.Latest.xml | 16 + ...NameTest.unsigned short.Windows.Preview.cs | 14 + ...ameTest.unsigned short.Windows.Preview.xml | 16 + ...rationTest.BitfieldTest.Unix.Compatible.cs | 181 ++ ...ationTest.BitfieldTest.Unix.Compatible.xml | 145 ++ ...clarationTest.BitfieldTest.Unix.Default.cs | 181 ++ ...larationTest.BitfieldTest.Unix.Default.xml | 145 ++ ...eclarationTest.BitfieldTest.Unix.Latest.cs | 181 ++ ...clarationTest.BitfieldTest.Unix.Latest.xml | 145 ++ ...clarationTest.BitfieldTest.Unix.Preview.cs | 181 ++ ...larationTest.BitfieldTest.Unix.Preview.xml | 145 ++ ...ionTest.BitfieldTest.Windows.Compatible.cs | 181 ++ ...onTest.BitfieldTest.Windows.Compatible.xml | 145 ++ ...rationTest.BitfieldTest.Windows.Default.cs | 181 ++ ...ationTest.BitfieldTest.Windows.Default.xml | 145 ++ ...arationTest.BitfieldTest.Windows.Latest.cs | 181 ++ ...rationTest.BitfieldTest.Windows.Latest.xml | 145 ++ ...rationTest.BitfieldTest.Windows.Preview.cs | 181 ++ ...ationTest.BitfieldTest.Windows.Preview.xml | 145 ++ ...veBitfieldAttributeTest.Unix.Compatible.cs | 192 ++ ...eBitfieldAttributeTest.Unix.Compatible.xml | 156 ++ ...ativeBitfieldAttributeTest.Unix.Default.cs | 192 ++ ...tiveBitfieldAttributeTest.Unix.Default.xml | 156 ++ ...NativeBitfieldAttributeTest.Unix.Latest.cs | 192 ++ ...ativeBitfieldAttributeTest.Unix.Latest.xml | 156 ++ ...ativeBitfieldAttributeTest.Unix.Preview.cs | 192 ++ ...tiveBitfieldAttributeTest.Unix.Preview.xml | 156 ++ ...itfieldAttributeTest.Windows.Compatible.cs | 192 ++ ...tfieldAttributeTest.Windows.Compatible.xml | 156 ++ ...veBitfieldAttributeTest.Windows.Default.cs | 192 ++ ...eBitfieldAttributeTest.Windows.Default.xml | 156 ++ ...iveBitfieldAttributeTest.Windows.Latest.cs | 192 ++ ...veBitfieldAttributeTest.Windows.Latest.xml | 156 ++ ...veBitfieldAttributeTest.Windows.Preview.cs | 192 ++ ...eBitfieldAttributeTest.Windows.Preview.xml | 156 ++ ...rationTest.DeclTypeTest.Unix.Compatible.cs | 17 + ...ationTest.DeclTypeTest.Unix.Compatible.xml | 15 + ...clarationTest.DeclTypeTest.Unix.Default.cs | 16 + ...larationTest.DeclTypeTest.Unix.Default.xml | 15 + ...eclarationTest.DeclTypeTest.Unix.Latest.cs | 16 + ...clarationTest.DeclTypeTest.Unix.Latest.xml | 15 + ...clarationTest.DeclTypeTest.Unix.Preview.cs | 16 + ...larationTest.DeclTypeTest.Unix.Preview.xml | 15 + ...ionTest.DeclTypeTest.Windows.Compatible.cs | 17 + ...onTest.DeclTypeTest.Windows.Compatible.xml | 15 + ...rationTest.DeclTypeTest.Windows.Default.cs | 16 + ...ationTest.DeclTypeTest.Windows.Default.xml | 15 + ...arationTest.DeclTypeTest.Windows.Latest.cs | 16 + ...rationTest.DeclTypeTest.Windows.Latest.xml | 15 + ...rationTest.DeclTypeTest.Windows.Preview.cs | 16 + ...ationTest.DeclTypeTest.Windows.Preview.xml | 15 + ...arationTest.ExcludeTest.Unix.Compatible.cs | 0 ...rationTest.ExcludeTest.Unix.Compatible.xml | 0 ...eclarationTest.ExcludeTest.Unix.Default.cs | 0 ...clarationTest.ExcludeTest.Unix.Default.xml | 0 ...DeclarationTest.ExcludeTest.Unix.Latest.cs | 0 ...eclarationTest.ExcludeTest.Unix.Latest.xml | 0 ...eclarationTest.ExcludeTest.Unix.Preview.cs | 0 ...clarationTest.ExcludeTest.Unix.Preview.xml | 0 ...tionTest.ExcludeTest.Windows.Compatible.cs | 0 ...ionTest.ExcludeTest.Windows.Compatible.xml | 0 ...arationTest.ExcludeTest.Windows.Default.cs | 0 ...rationTest.ExcludeTest.Windows.Default.xml | 0 ...larationTest.ExcludeTest.Windows.Latest.cs | 0 ...arationTest.ExcludeTest.Windows.Latest.xml | 0 ...arationTest.ExcludeTest.Windows.Preview.cs | 0 ...rationTest.ExcludeTest.Windows.Preview.xml | 0 ...idimensionalTest.double.Unix.Compatible.cs | 63 + ...dimensionalTest.double.Unix.Compatible.xml | 101 + ...ultidimensionalTest.double.Unix.Default.cs | 65 + ...ltidimensionalTest.double.Unix.Default.xml | 102 + ...MultidimensionalTest.double.Unix.Latest.cs | 21 + ...ultidimensionalTest.double.Unix.Latest.xml | 21 + ...ultidimensionalTest.double.Unix.Preview.cs | 21 + ...ltidimensionalTest.double.Unix.Preview.xml | 21 + ...mensionalTest.double.Windows.Compatible.cs | 63 + ...ensionalTest.double.Windows.Compatible.xml | 101 + ...idimensionalTest.double.Windows.Default.cs | 65 + ...dimensionalTest.double.Windows.Default.xml | 102 + ...tidimensionalTest.double.Windows.Latest.cs | 21 + ...idimensionalTest.double.Windows.Latest.xml | 21 + ...idimensionalTest.double.Windows.Preview.cs | 21 + ...dimensionalTest.double.Windows.Preview.xml | 21 + ...tidimensionalTest.float.Unix.Compatible.cs | 63 + ...idimensionalTest.float.Unix.Compatible.xml | 101 + ...MultidimensionalTest.float.Unix.Default.cs | 65 + ...ultidimensionalTest.float.Unix.Default.xml | 102 + ...eMultidimensionalTest.float.Unix.Latest.cs | 21 + ...MultidimensionalTest.float.Unix.Latest.xml | 21 + ...MultidimensionalTest.float.Unix.Preview.cs | 21 + ...ultidimensionalTest.float.Unix.Preview.xml | 21 + ...imensionalTest.float.Windows.Compatible.cs | 63 + ...mensionalTest.float.Windows.Compatible.xml | 101 + ...tidimensionalTest.float.Windows.Default.cs | 65 + ...idimensionalTest.float.Windows.Default.xml | 102 + ...ltidimensionalTest.float.Windows.Latest.cs | 21 + ...tidimensionalTest.float.Windows.Latest.xml | 21 + ...tidimensionalTest.float.Windows.Preview.cs | 21 + ...idimensionalTest.float.Windows.Preview.xml | 21 + ...ultidimensionalTest.int.Unix.Compatible.cs | 63 + ...ltidimensionalTest.int.Unix.Compatible.xml | 101 + ...veMultidimensionalTest.int.Unix.Default.cs | 65 + ...eMultidimensionalTest.int.Unix.Default.xml | 102 + ...iveMultidimensionalTest.int.Unix.Latest.cs | 21 + ...veMultidimensionalTest.int.Unix.Latest.xml | 21 + ...veMultidimensionalTest.int.Unix.Preview.cs | 21 + ...eMultidimensionalTest.int.Unix.Preview.xml | 21 + ...idimensionalTest.int.Windows.Compatible.cs | 63 + ...dimensionalTest.int.Windows.Compatible.xml | 101 + ...ultidimensionalTest.int.Windows.Default.cs | 65 + ...ltidimensionalTest.int.Windows.Default.xml | 102 + ...MultidimensionalTest.int.Windows.Latest.cs | 21 + ...ultidimensionalTest.int.Windows.Latest.xml | 21 + ...ultidimensionalTest.int.Windows.Preview.cs | 21 + ...ltidimensionalTest.int.Windows.Preview.xml | 21 + ...tidimensionalTest.short.Unix.Compatible.cs | 63 + ...idimensionalTest.short.Unix.Compatible.xml | 101 + ...MultidimensionalTest.short.Unix.Default.cs | 65 + ...ultidimensionalTest.short.Unix.Default.xml | 102 + ...eMultidimensionalTest.short.Unix.Latest.cs | 21 + ...MultidimensionalTest.short.Unix.Latest.xml | 21 + ...MultidimensionalTest.short.Unix.Preview.cs | 21 + ...ultidimensionalTest.short.Unix.Preview.xml | 21 + ...imensionalTest.short.Windows.Compatible.cs | 63 + ...mensionalTest.short.Windows.Compatible.xml | 101 + ...tidimensionalTest.short.Windows.Default.cs | 65 + ...idimensionalTest.short.Windows.Default.xml | 102 + ...ltidimensionalTest.short.Windows.Latest.cs | 21 + ...tidimensionalTest.short.Windows.Latest.xml | 21 + ...tidimensionalTest.short.Windows.Preview.cs | 21 + ...idimensionalTest.short.Windows.Preview.xml | 21 + ...NonPrimitiveTest.double.Unix.Compatible.cs | 31 + ...onPrimitiveTest.double.Unix.Compatible.xml | 38 + ...ferNonPrimitiveTest.double.Unix.Default.cs | 33 + ...erNonPrimitiveTest.double.Unix.Default.xml | 39 + ...fferNonPrimitiveTest.double.Unix.Latest.cs | 21 + ...ferNonPrimitiveTest.double.Unix.Latest.xml | 21 + ...ferNonPrimitiveTest.double.Unix.Preview.cs | 21 + ...erNonPrimitiveTest.double.Unix.Preview.xml | 21 + ...PrimitiveTest.double.Windows.Compatible.cs | 31 + ...rimitiveTest.double.Windows.Compatible.xml | 38 + ...NonPrimitiveTest.double.Windows.Default.cs | 33 + ...onPrimitiveTest.double.Windows.Default.xml | 39 + ...rNonPrimitiveTest.double.Windows.Latest.cs | 21 + ...NonPrimitiveTest.double.Windows.Latest.xml | 21 + ...NonPrimitiveTest.double.Windows.Preview.cs | 21 + ...onPrimitiveTest.double.Windows.Preview.xml | 21 + ...rNonPrimitiveTest.float.Unix.Compatible.cs | 31 + ...NonPrimitiveTest.float.Unix.Compatible.xml | 38 + ...fferNonPrimitiveTest.float.Unix.Default.cs | 33 + ...ferNonPrimitiveTest.float.Unix.Default.xml | 39 + ...ufferNonPrimitiveTest.float.Unix.Latest.cs | 21 + ...fferNonPrimitiveTest.float.Unix.Latest.xml | 21 + ...fferNonPrimitiveTest.float.Unix.Preview.cs | 21 + ...ferNonPrimitiveTest.float.Unix.Preview.xml | 21 + ...nPrimitiveTest.float.Windows.Compatible.cs | 31 + ...PrimitiveTest.float.Windows.Compatible.xml | 38 + ...rNonPrimitiveTest.float.Windows.Default.cs | 33 + ...NonPrimitiveTest.float.Windows.Default.xml | 39 + ...erNonPrimitiveTest.float.Windows.Latest.cs | 21 + ...rNonPrimitiveTest.float.Windows.Latest.xml | 21 + ...rNonPrimitiveTest.float.Windows.Preview.cs | 21 + ...NonPrimitiveTest.float.Windows.Preview.xml | 21 + ...ferNonPrimitiveTest.int.Unix.Compatible.cs | 31 + ...erNonPrimitiveTest.int.Unix.Compatible.xml | 38 + ...BufferNonPrimitiveTest.int.Unix.Default.cs | 33 + ...ufferNonPrimitiveTest.int.Unix.Default.xml | 39 + ...dBufferNonPrimitiveTest.int.Unix.Latest.cs | 21 + ...BufferNonPrimitiveTest.int.Unix.Latest.xml | 21 + ...BufferNonPrimitiveTest.int.Unix.Preview.cs | 21 + ...ufferNonPrimitiveTest.int.Unix.Preview.xml | 21 + ...NonPrimitiveTest.int.Windows.Compatible.cs | 31 + ...onPrimitiveTest.int.Windows.Compatible.xml | 38 + ...ferNonPrimitiveTest.int.Windows.Default.cs | 33 + ...erNonPrimitiveTest.int.Windows.Default.xml | 39 + ...fferNonPrimitiveTest.int.Windows.Latest.cs | 21 + ...ferNonPrimitiveTest.int.Windows.Latest.xml | 21 + ...ferNonPrimitiveTest.int.Windows.Preview.cs | 21 + ...erNonPrimitiveTest.int.Windows.Preview.xml | 21 + ...rNonPrimitiveTest.short.Unix.Compatible.cs | 31 + ...NonPrimitiveTest.short.Unix.Compatible.xml | 38 + ...fferNonPrimitiveTest.short.Unix.Default.cs | 33 + ...ferNonPrimitiveTest.short.Unix.Default.xml | 39 + ...ufferNonPrimitiveTest.short.Unix.Latest.cs | 21 + ...fferNonPrimitiveTest.short.Unix.Latest.xml | 21 + ...fferNonPrimitiveTest.short.Unix.Preview.cs | 21 + ...ferNonPrimitiveTest.short.Unix.Preview.xml | 21 + ...nPrimitiveTest.short.Windows.Compatible.cs | 31 + ...PrimitiveTest.short.Windows.Compatible.xml | 38 + ...rNonPrimitiveTest.short.Windows.Default.cs | 33 + ...NonPrimitiveTest.short.Windows.Default.xml | 39 + ...erNonPrimitiveTest.short.Windows.Latest.cs | 21 + ...rNonPrimitiveTest.short.Windows.Latest.xml | 21 + ...rNonPrimitiveTest.short.Windows.Preview.cs | 21 + ...NonPrimitiveTest.short.Windows.Preview.xml | 21 + ...itiveTypedefTest.double.Unix.Compatible.cs | 31 + ...tiveTypedefTest.double.Unix.Compatible.xml | 38 + ...rimitiveTypedefTest.double.Unix.Default.cs | 33 + ...imitiveTypedefTest.double.Unix.Default.xml | 39 + ...PrimitiveTypedefTest.double.Unix.Latest.cs | 21 + ...rimitiveTypedefTest.double.Unix.Latest.xml | 21 + ...rimitiveTypedefTest.double.Unix.Preview.cs | 21 + ...imitiveTypedefTest.double.Unix.Preview.xml | 21 + ...veTypedefTest.double.Windows.Compatible.cs | 31 + ...eTypedefTest.double.Windows.Compatible.xml | 38 + ...itiveTypedefTest.double.Windows.Default.cs | 33 + ...tiveTypedefTest.double.Windows.Default.xml | 39 + ...mitiveTypedefTest.double.Windows.Latest.cs | 21 + ...itiveTypedefTest.double.Windows.Latest.xml | 21 + ...itiveTypedefTest.double.Windows.Preview.cs | 21 + ...tiveTypedefTest.double.Windows.Preview.xml | 21 + ...mitiveTypedefTest.float.Unix.Compatible.cs | 31 + ...itiveTypedefTest.float.Unix.Compatible.xml | 38 + ...PrimitiveTypedefTest.float.Unix.Default.cs | 33 + ...rimitiveTypedefTest.float.Unix.Default.xml | 39 + ...nPrimitiveTypedefTest.float.Unix.Latest.cs | 21 + ...PrimitiveTypedefTest.float.Unix.Latest.xml | 21 + ...PrimitiveTypedefTest.float.Unix.Preview.cs | 21 + ...rimitiveTypedefTest.float.Unix.Preview.xml | 21 + ...iveTypedefTest.float.Windows.Compatible.cs | 31 + ...veTypedefTest.float.Windows.Compatible.xml | 38 + ...mitiveTypedefTest.float.Windows.Default.cs | 33 + ...itiveTypedefTest.float.Windows.Default.xml | 39 + ...imitiveTypedefTest.float.Windows.Latest.cs | 21 + ...mitiveTypedefTest.float.Windows.Latest.xml | 21 + ...mitiveTypedefTest.float.Windows.Preview.cs | 21 + ...itiveTypedefTest.float.Windows.Preview.xml | 21 + ...rimitiveTypedefTest.int.Unix.Compatible.cs | 31 + ...imitiveTypedefTest.int.Unix.Compatible.xml | 38 + ...onPrimitiveTypedefTest.int.Unix.Default.cs | 33 + ...nPrimitiveTypedefTest.int.Unix.Default.xml | 39 + ...NonPrimitiveTypedefTest.int.Unix.Latest.cs | 21 + ...onPrimitiveTypedefTest.int.Unix.Latest.xml | 21 + ...onPrimitiveTypedefTest.int.Unix.Preview.cs | 21 + ...nPrimitiveTypedefTest.int.Unix.Preview.xml | 21 + ...itiveTypedefTest.int.Windows.Compatible.cs | 31 + ...tiveTypedefTest.int.Windows.Compatible.xml | 38 + ...rimitiveTypedefTest.int.Windows.Default.cs | 33 + ...imitiveTypedefTest.int.Windows.Default.xml | 39 + ...PrimitiveTypedefTest.int.Windows.Latest.cs | 21 + ...rimitiveTypedefTest.int.Windows.Latest.xml | 21 + ...rimitiveTypedefTest.int.Windows.Preview.cs | 21 + ...imitiveTypedefTest.int.Windows.Preview.xml | 21 + ...mitiveTypedefTest.short.Unix.Compatible.cs | 31 + ...itiveTypedefTest.short.Unix.Compatible.xml | 38 + ...PrimitiveTypedefTest.short.Unix.Default.cs | 33 + ...rimitiveTypedefTest.short.Unix.Default.xml | 39 + ...nPrimitiveTypedefTest.short.Unix.Latest.cs | 21 + ...PrimitiveTypedefTest.short.Unix.Latest.xml | 21 + ...PrimitiveTypedefTest.short.Unix.Preview.cs | 21 + ...rimitiveTypedefTest.short.Unix.Preview.xml | 21 + ...iveTypedefTest.short.Windows.Compatible.cs | 31 + ...veTypedefTest.short.Windows.Compatible.xml | 38 + ...mitiveTypedefTest.short.Windows.Default.cs | 33 + ...itiveTypedefTest.short.Windows.Default.xml | 39 + ...imitiveTypedefTest.short.Windows.Latest.cs | 21 + ...mitiveTypedefTest.short.Windows.Latest.xml | 21 + ...mitiveTypedefTest.short.Windows.Preview.cs | 21 + ...itiveTypedefTest.short.Windows.Preview.xml | 21 + ...NativeTypeNameTest.bool.Unix.Compatible.cs | 32 + ...ativeTypeNameTest.bool.Unix.Compatible.xml | 38 + ...ithNativeTypeNameTest.bool.Unix.Default.cs | 34 + ...thNativeTypeNameTest.bool.Unix.Default.xml | 39 + ...WithNativeTypeNameTest.bool.Unix.Latest.cs | 22 + ...ithNativeTypeNameTest.bool.Unix.Latest.xml | 21 + ...ithNativeTypeNameTest.bool.Unix.Preview.cs | 22 + ...thNativeTypeNameTest.bool.Unix.Preview.xml | 21 + ...iveTypeNameTest.bool.Windows.Compatible.cs | 32 + ...veTypeNameTest.bool.Windows.Compatible.xml | 38 + ...NativeTypeNameTest.bool.Windows.Default.cs | 34 + ...ativeTypeNameTest.bool.Windows.Default.xml | 39 + ...hNativeTypeNameTest.bool.Windows.Latest.cs | 22 + ...NativeTypeNameTest.bool.Windows.Latest.xml | 21 + ...NativeTypeNameTest.bool.Windows.Preview.cs | 22 + ...ativeTypeNameTest.bool.Windows.Preview.xml | 21 + ...eTypeNameTest.long long.Unix.Compatible.cs | 32 + ...TypeNameTest.long long.Unix.Compatible.xml | 38 + ...tiveTypeNameTest.long long.Unix.Default.cs | 34 + ...iveTypeNameTest.long long.Unix.Default.xml | 39 + ...ativeTypeNameTest.long long.Unix.Latest.cs | 22 + ...tiveTypeNameTest.long long.Unix.Latest.xml | 21 + ...tiveTypeNameTest.long long.Unix.Preview.cs | 22 + ...iveTypeNameTest.long long.Unix.Preview.xml | 21 + ...peNameTest.long long.Windows.Compatible.cs | 32 + ...eNameTest.long long.Windows.Compatible.xml | 38 + ...eTypeNameTest.long long.Windows.Default.cs | 34 + ...TypeNameTest.long long.Windows.Default.xml | 39 + ...veTypeNameTest.long long.Windows.Latest.cs | 22 + ...eTypeNameTest.long long.Windows.Latest.xml | 21 + ...eTypeNameTest.long long.Windows.Preview.cs | 22 + ...TypeNameTest.long long.Windows.Preview.xml | 21 + ...ypeNameTest.signed char.Unix.Compatible.cs | 32 + ...peNameTest.signed char.Unix.Compatible.xml | 38 + ...veTypeNameTest.signed char.Unix.Default.cs | 34 + ...eTypeNameTest.signed char.Unix.Default.xml | 39 + ...iveTypeNameTest.signed char.Unix.Latest.cs | 22 + ...veTypeNameTest.signed char.Unix.Latest.xml | 21 + ...veTypeNameTest.signed char.Unix.Preview.cs | 22 + ...eTypeNameTest.signed char.Unix.Preview.xml | 21 + ...NameTest.signed char.Windows.Compatible.cs | 32 + ...ameTest.signed char.Windows.Compatible.xml | 38 + ...ypeNameTest.signed char.Windows.Default.cs | 34 + ...peNameTest.signed char.Windows.Default.xml | 39 + ...TypeNameTest.signed char.Windows.Latest.cs | 22 + ...ypeNameTest.signed char.Windows.Latest.xml | 21 + ...ypeNameTest.signed char.Windows.Preview.cs | 22 + ...peNameTest.signed char.Windows.Preview.xml | 21 + ...eNameTest.unsigned char.Unix.Compatible.cs | 32 + ...NameTest.unsigned char.Unix.Compatible.xml | 38 + ...TypeNameTest.unsigned char.Unix.Default.cs | 34 + ...ypeNameTest.unsigned char.Unix.Default.xml | 39 + ...eTypeNameTest.unsigned char.Unix.Latest.cs | 22 + ...TypeNameTest.unsigned char.Unix.Latest.xml | 21 + ...TypeNameTest.unsigned char.Unix.Preview.cs | 22 + ...ypeNameTest.unsigned char.Unix.Preview.xml | 21 + ...meTest.unsigned char.Windows.Compatible.cs | 32 + ...eTest.unsigned char.Windows.Compatible.xml | 38 + ...eNameTest.unsigned char.Windows.Default.cs | 34 + ...NameTest.unsigned char.Windows.Default.xml | 39 + ...peNameTest.unsigned char.Windows.Latest.cs | 22 + ...eNameTest.unsigned char.Windows.Latest.xml | 21 + ...eNameTest.unsigned char.Windows.Preview.cs | 22 + ...NameTest.unsigned char.Windows.Preview.xml | 21 + ...peNameTest.unsigned int.Unix.Compatible.cs | 32 + ...eNameTest.unsigned int.Unix.Compatible.xml | 38 + ...eTypeNameTest.unsigned int.Unix.Default.cs | 34 + ...TypeNameTest.unsigned int.Unix.Default.xml | 39 + ...veTypeNameTest.unsigned int.Unix.Latest.cs | 22 + ...eTypeNameTest.unsigned int.Unix.Latest.xml | 21 + ...eTypeNameTest.unsigned int.Unix.Preview.cs | 22 + ...TypeNameTest.unsigned int.Unix.Preview.xml | 21 + ...ameTest.unsigned int.Windows.Compatible.cs | 32 + ...meTest.unsigned int.Windows.Compatible.xml | 38 + ...peNameTest.unsigned int.Windows.Default.cs | 34 + ...eNameTest.unsigned int.Windows.Default.xml | 39 + ...ypeNameTest.unsigned int.Windows.Latest.cs | 22 + ...peNameTest.unsigned int.Windows.Latest.xml | 21 + ...peNameTest.unsigned int.Windows.Preview.cs | 22 + ...eNameTest.unsigned int.Windows.Preview.xml | 21 + ...Test.unsigned long long.Unix.Compatible.cs | 32 + ...est.unsigned long long.Unix.Compatible.xml | 38 + ...ameTest.unsigned long long.Unix.Default.cs | 34 + ...meTest.unsigned long long.Unix.Default.xml | 39 + ...NameTest.unsigned long long.Unix.Latest.cs | 22 + ...ameTest.unsigned long long.Unix.Latest.xml | 21 + ...ameTest.unsigned long long.Unix.Preview.cs | 22 + ...meTest.unsigned long long.Unix.Preview.xml | 21 + ...t.unsigned long long.Windows.Compatible.cs | 32 + ....unsigned long long.Windows.Compatible.xml | 38 + ...Test.unsigned long long.Windows.Default.cs | 34 + ...est.unsigned long long.Windows.Default.xml | 39 + ...eTest.unsigned long long.Windows.Latest.cs | 22 + ...Test.unsigned long long.Windows.Latest.xml | 21 + ...Test.unsigned long long.Windows.Preview.cs | 22 + ...est.unsigned long long.Windows.Preview.xml | 21 + ...NameTest.unsigned short.Unix.Compatible.cs | 32 + ...ameTest.unsigned short.Unix.Compatible.xml | 38 + ...ypeNameTest.unsigned short.Unix.Default.cs | 34 + ...peNameTest.unsigned short.Unix.Default.xml | 39 + ...TypeNameTest.unsigned short.Unix.Latest.cs | 22 + ...ypeNameTest.unsigned short.Unix.Latest.xml | 21 + ...ypeNameTest.unsigned short.Unix.Preview.cs | 22 + ...peNameTest.unsigned short.Unix.Preview.xml | 21 + ...eTest.unsigned short.Windows.Compatible.cs | 32 + ...Test.unsigned short.Windows.Compatible.xml | 38 + ...NameTest.unsigned short.Windows.Default.cs | 34 + ...ameTest.unsigned short.Windows.Default.xml | 39 + ...eNameTest.unsigned short.Windows.Latest.cs | 22 + ...NameTest.unsigned short.Windows.Latest.xml | 21 + ...NameTest.unsigned short.Windows.Preview.cs | 22 + ...ameTest.unsigned short.Windows.Preview.xml | 21 + ...ointerTest.double __ast.Unix.Compatible.cs | 26 + ...interTest.double __ast.Unix.Compatible.xml | 33 + ...erPointerTest.double __ast.Unix.Default.cs | 26 + ...rPointerTest.double __ast.Unix.Default.xml | 33 + ...ferPointerTest.double __ast.Unix.Latest.cs | 26 + ...erPointerTest.double __ast.Unix.Latest.xml | 33 + ...erPointerTest.double __ast.Unix.Preview.cs | 26 + ...rPointerTest.double __ast.Unix.Preview.xml | 33 + ...terTest.double __ast.Windows.Compatible.cs | 26 + ...erTest.double __ast.Windows.Compatible.xml | 33 + ...ointerTest.double __ast.Windows.Default.cs | 26 + ...interTest.double __ast.Windows.Default.xml | 33 + ...PointerTest.double __ast.Windows.Latest.cs | 26 + ...ointerTest.double __ast.Windows.Latest.xml | 33 + ...ointerTest.double __ast.Windows.Preview.cs | 26 + ...interTest.double __ast.Windows.Preview.xml | 33 + ...PointerTest.float __ast.Unix.Compatible.cs | 26 + ...ointerTest.float __ast.Unix.Compatible.xml | 33 + ...ferPointerTest.float __ast.Unix.Default.cs | 26 + ...erPointerTest.float __ast.Unix.Default.xml | 33 + ...fferPointerTest.float __ast.Unix.Latest.cs | 26 + ...ferPointerTest.float __ast.Unix.Latest.xml | 33 + ...ferPointerTest.float __ast.Unix.Preview.cs | 26 + ...erPointerTest.float __ast.Unix.Preview.xml | 33 + ...nterTest.float __ast.Windows.Compatible.cs | 26 + ...terTest.float __ast.Windows.Compatible.xml | 33 + ...PointerTest.float __ast.Windows.Default.cs | 26 + ...ointerTest.float __ast.Windows.Default.xml | 33 + ...rPointerTest.float __ast.Windows.Latest.cs | 26 + ...PointerTest.float __ast.Windows.Latest.xml | 33 + ...PointerTest.float __ast.Windows.Preview.cs | 26 + ...ointerTest.float __ast.Windows.Preview.xml | 33 + ...erPointerTest.int __ast.Unix.Compatible.cs | 26 + ...rPointerTest.int __ast.Unix.Compatible.xml | 33 + ...ufferPointerTest.int __ast.Unix.Default.cs | 26 + ...fferPointerTest.int __ast.Unix.Default.xml | 33 + ...BufferPointerTest.int __ast.Unix.Latest.cs | 26 + ...ufferPointerTest.int __ast.Unix.Latest.xml | 33 + ...ufferPointerTest.int __ast.Unix.Preview.cs | 26 + ...fferPointerTest.int __ast.Unix.Preview.xml | 33 + ...ointerTest.int __ast.Windows.Compatible.cs | 26 + ...interTest.int __ast.Windows.Compatible.xml | 33 + ...erPointerTest.int __ast.Windows.Default.cs | 26 + ...rPointerTest.int __ast.Windows.Default.xml | 33 + ...ferPointerTest.int __ast.Windows.Latest.cs | 26 + ...erPointerTest.int __ast.Windows.Latest.xml | 33 + ...erPointerTest.int __ast.Windows.Preview.cs | 26 + ...rPointerTest.int __ast.Windows.Preview.xml | 33 + ...PointerTest.short __ast.Unix.Compatible.cs | 26 + ...ointerTest.short __ast.Unix.Compatible.xml | 33 + ...ferPointerTest.short __ast.Unix.Default.cs | 26 + ...erPointerTest.short __ast.Unix.Default.xml | 33 + ...fferPointerTest.short __ast.Unix.Latest.cs | 26 + ...ferPointerTest.short __ast.Unix.Latest.xml | 33 + ...ferPointerTest.short __ast.Unix.Preview.cs | 26 + ...erPointerTest.short __ast.Unix.Preview.xml | 33 + ...nterTest.short __ast.Windows.Compatible.cs | 26 + ...terTest.short __ast.Windows.Compatible.xml | 33 + ...PointerTest.short __ast.Windows.Default.cs | 26 + ...ointerTest.short __ast.Windows.Default.xml | 33 + ...rPointerTest.short __ast.Windows.Latest.cs | 26 + ...PointerTest.short __ast.Windows.Latest.xml | 33 + ...PointerTest.short __ast.Windows.Preview.cs | 26 + ...ointerTest.short __ast.Windows.Preview.xml | 33 + ...idimensionalTest.double.Unix.Compatible.cs | 8 + ...dimensionalTest.double.Unix.Compatible.xml | 10 + ...ultidimensionalTest.double.Unix.Default.cs | 8 + ...ltidimensionalTest.double.Unix.Default.xml | 10 + ...MultidimensionalTest.double.Unix.Latest.cs | 16 + ...ultidimensionalTest.double.Unix.Latest.xml | 16 + ...ultidimensionalTest.double.Unix.Preview.cs | 16 + ...ltidimensionalTest.double.Unix.Preview.xml | 16 + ...mensionalTest.double.Windows.Compatible.cs | 8 + ...ensionalTest.double.Windows.Compatible.xml | 10 + ...idimensionalTest.double.Windows.Default.cs | 8 + ...dimensionalTest.double.Windows.Default.xml | 10 + ...tidimensionalTest.double.Windows.Latest.cs | 16 + ...idimensionalTest.double.Windows.Latest.xml | 16 + ...idimensionalTest.double.Windows.Preview.cs | 16 + ...dimensionalTest.double.Windows.Preview.xml | 16 + ...tidimensionalTest.float.Unix.Compatible.cs | 8 + ...idimensionalTest.float.Unix.Compatible.xml | 10 + ...MultidimensionalTest.float.Unix.Default.cs | 8 + ...ultidimensionalTest.float.Unix.Default.xml | 10 + ...eMultidimensionalTest.float.Unix.Latest.cs | 16 + ...MultidimensionalTest.float.Unix.Latest.xml | 16 + ...MultidimensionalTest.float.Unix.Preview.cs | 16 + ...ultidimensionalTest.float.Unix.Preview.xml | 16 + ...imensionalTest.float.Windows.Compatible.cs | 8 + ...mensionalTest.float.Windows.Compatible.xml | 10 + ...tidimensionalTest.float.Windows.Default.cs | 8 + ...idimensionalTest.float.Windows.Default.xml | 10 + ...ltidimensionalTest.float.Windows.Latest.cs | 16 + ...tidimensionalTest.float.Windows.Latest.xml | 16 + ...tidimensionalTest.float.Windows.Preview.cs | 16 + ...idimensionalTest.float.Windows.Preview.xml | 16 + ...ultidimensionalTest.int.Unix.Compatible.cs | 8 + ...ltidimensionalTest.int.Unix.Compatible.xml | 10 + ...veMultidimensionalTest.int.Unix.Default.cs | 8 + ...eMultidimensionalTest.int.Unix.Default.xml | 10 + ...iveMultidimensionalTest.int.Unix.Latest.cs | 16 + ...veMultidimensionalTest.int.Unix.Latest.xml | 16 + ...veMultidimensionalTest.int.Unix.Preview.cs | 16 + ...eMultidimensionalTest.int.Unix.Preview.xml | 16 + ...idimensionalTest.int.Windows.Compatible.cs | 8 + ...dimensionalTest.int.Windows.Compatible.xml | 10 + ...ultidimensionalTest.int.Windows.Default.cs | 8 + ...ltidimensionalTest.int.Windows.Default.xml | 10 + ...MultidimensionalTest.int.Windows.Latest.cs | 16 + ...ultidimensionalTest.int.Windows.Latest.xml | 16 + ...ultidimensionalTest.int.Windows.Preview.cs | 16 + ...ltidimensionalTest.int.Windows.Preview.xml | 16 + ...mensionalTest.long long.Unix.Compatible.cs | 8 + ...ensionalTest.long long.Unix.Compatible.xml | 10 + ...idimensionalTest.long long.Unix.Default.cs | 8 + ...dimensionalTest.long long.Unix.Default.xml | 10 + ...tidimensionalTest.long long.Unix.Latest.cs | 16 + ...idimensionalTest.long long.Unix.Latest.xml | 16 + ...idimensionalTest.long long.Unix.Preview.cs | 16 + ...dimensionalTest.long long.Unix.Preview.xml | 16 + ...sionalTest.long long.Windows.Compatible.cs | 8 + ...ionalTest.long long.Windows.Compatible.xml | 10 + ...mensionalTest.long long.Windows.Default.cs | 8 + ...ensionalTest.long long.Windows.Default.xml | 10 + ...imensionalTest.long long.Windows.Latest.cs | 16 + ...mensionalTest.long long.Windows.Latest.xml | 16 + ...mensionalTest.long long.Windows.Preview.cs | 16 + ...ensionalTest.long long.Windows.Preview.xml | 16 + ...tidimensionalTest.short.Unix.Compatible.cs | 8 + ...idimensionalTest.short.Unix.Compatible.xml | 10 + ...MultidimensionalTest.short.Unix.Default.cs | 8 + ...ultidimensionalTest.short.Unix.Default.xml | 10 + ...eMultidimensionalTest.short.Unix.Latest.cs | 16 + ...MultidimensionalTest.short.Unix.Latest.xml | 16 + ...MultidimensionalTest.short.Unix.Preview.cs | 16 + ...ultidimensionalTest.short.Unix.Preview.xml | 16 + ...imensionalTest.short.Windows.Compatible.cs | 8 + ...mensionalTest.short.Windows.Compatible.xml | 10 + ...tidimensionalTest.short.Windows.Default.cs | 8 + ...idimensionalTest.short.Windows.Default.xml | 10 + ...ltidimensionalTest.short.Windows.Latest.cs | 16 + ...tidimensionalTest.short.Windows.Latest.xml | 16 + ...tidimensionalTest.short.Windows.Preview.cs | 16 + ...idimensionalTest.short.Windows.Preview.xml | 16 + ...nsionalTest.signed char.Unix.Compatible.cs | 8 + ...sionalTest.signed char.Unix.Compatible.xml | 10 + ...imensionalTest.signed char.Unix.Default.cs | 8 + ...mensionalTest.signed char.Unix.Default.xml | 10 + ...dimensionalTest.signed char.Unix.Latest.cs | 16 + ...imensionalTest.signed char.Unix.Latest.xml | 16 + ...imensionalTest.signed char.Unix.Preview.cs | 16 + ...mensionalTest.signed char.Unix.Preview.xml | 16 + ...onalTest.signed char.Windows.Compatible.cs | 8 + ...nalTest.signed char.Windows.Compatible.xml | 10 + ...nsionalTest.signed char.Windows.Default.cs | 8 + ...sionalTest.signed char.Windows.Default.xml | 10 + ...ensionalTest.signed char.Windows.Latest.cs | 16 + ...nsionalTest.signed char.Windows.Latest.xml | 16 + ...nsionalTest.signed char.Windows.Preview.cs | 16 + ...sionalTest.signed char.Windows.Preview.xml | 16 + ...ionalTest.unsigned char.Unix.Compatible.cs | 8 + ...onalTest.unsigned char.Unix.Compatible.xml | 10 + ...ensionalTest.unsigned char.Unix.Default.cs | 8 + ...nsionalTest.unsigned char.Unix.Default.xml | 10 + ...mensionalTest.unsigned char.Unix.Latest.cs | 16 + ...ensionalTest.unsigned char.Unix.Latest.xml | 16 + ...ensionalTest.unsigned char.Unix.Preview.cs | 16 + ...nsionalTest.unsigned char.Unix.Preview.xml | 16 + ...alTest.unsigned char.Windows.Compatible.cs | 8 + ...lTest.unsigned char.Windows.Compatible.xml | 10 + ...ionalTest.unsigned char.Windows.Default.cs | 8 + ...onalTest.unsigned char.Windows.Default.xml | 10 + ...sionalTest.unsigned char.Windows.Latest.cs | 16 + ...ionalTest.unsigned char.Windows.Latest.xml | 16 + ...ionalTest.unsigned char.Windows.Preview.cs | 16 + ...onalTest.unsigned char.Windows.Preview.xml | 16 + ...sionalTest.unsigned int.Unix.Compatible.cs | 8 + ...ionalTest.unsigned int.Unix.Compatible.xml | 10 + ...mensionalTest.unsigned int.Unix.Default.cs | 8 + ...ensionalTest.unsigned int.Unix.Default.xml | 10 + ...imensionalTest.unsigned int.Unix.Latest.cs | 16 + ...mensionalTest.unsigned int.Unix.Latest.xml | 16 + ...mensionalTest.unsigned int.Unix.Preview.cs | 16 + ...ensionalTest.unsigned int.Unix.Preview.xml | 16 + ...nalTest.unsigned int.Windows.Compatible.cs | 8 + ...alTest.unsigned int.Windows.Compatible.xml | 10 + ...sionalTest.unsigned int.Windows.Default.cs | 8 + ...ionalTest.unsigned int.Windows.Default.xml | 10 + ...nsionalTest.unsigned int.Windows.Latest.cs | 16 + ...sionalTest.unsigned int.Windows.Latest.xml | 16 + ...sionalTest.unsigned int.Windows.Preview.cs | 16 + ...ionalTest.unsigned int.Windows.Preview.xml | 16 + ...Test.unsigned long long.Unix.Compatible.cs | 8 + ...est.unsigned long long.Unix.Compatible.xml | 10 + ...nalTest.unsigned long long.Unix.Default.cs | 8 + ...alTest.unsigned long long.Unix.Default.xml | 10 + ...onalTest.unsigned long long.Unix.Latest.cs | 16 + ...nalTest.unsigned long long.Unix.Latest.xml | 16 + ...nalTest.unsigned long long.Unix.Preview.cs | 16 + ...alTest.unsigned long long.Unix.Preview.xml | 16 + ...t.unsigned long long.Windows.Compatible.cs | 8 + ....unsigned long long.Windows.Compatible.xml | 10 + ...Test.unsigned long long.Windows.Default.cs | 8 + ...est.unsigned long long.Windows.Default.xml | 10 + ...lTest.unsigned long long.Windows.Latest.cs | 16 + ...Test.unsigned long long.Windows.Latest.xml | 16 + ...Test.unsigned long long.Windows.Preview.cs | 16 + ...est.unsigned long long.Windows.Preview.xml | 16 + ...onalTest.unsigned short.Unix.Compatible.cs | 8 + ...nalTest.unsigned short.Unix.Compatible.xml | 10 + ...nsionalTest.unsigned short.Unix.Default.cs | 8 + ...sionalTest.unsigned short.Unix.Default.xml | 10 + ...ensionalTest.unsigned short.Unix.Latest.cs | 16 + ...nsionalTest.unsigned short.Unix.Latest.xml | 16 + ...nsionalTest.unsigned short.Unix.Preview.cs | 16 + ...sionalTest.unsigned short.Unix.Preview.xml | 16 + ...lTest.unsigned short.Windows.Compatible.cs | 8 + ...Test.unsigned short.Windows.Compatible.xml | 10 + ...onalTest.unsigned short.Windows.Default.cs | 8 + ...nalTest.unsigned short.Windows.Default.xml | 10 + ...ionalTest.unsigned short.Windows.Latest.cs | 16 + ...onalTest.unsigned short.Windows.Latest.xml | 16 + ...onalTest.unsigned short.Windows.Preview.cs | 16 + ...nalTest.unsigned short.Windows.Preview.xml | 16 + ...ferPrimitiveTest.double.Unix.Compatible.cs | 8 + ...erPrimitiveTest.double.Unix.Compatible.xml | 10 + ...BufferPrimitiveTest.double.Unix.Default.cs | 8 + ...ufferPrimitiveTest.double.Unix.Default.xml | 10 + ...dBufferPrimitiveTest.double.Unix.Latest.cs | 16 + ...BufferPrimitiveTest.double.Unix.Latest.xml | 16 + ...BufferPrimitiveTest.double.Unix.Preview.cs | 16 + ...ufferPrimitiveTest.double.Unix.Preview.xml | 16 + ...PrimitiveTest.double.Windows.Compatible.cs | 8 + ...rimitiveTest.double.Windows.Compatible.xml | 10 + ...ferPrimitiveTest.double.Windows.Default.cs | 8 + ...erPrimitiveTest.double.Windows.Default.xml | 10 + ...fferPrimitiveTest.double.Windows.Latest.cs | 16 + ...ferPrimitiveTest.double.Windows.Latest.xml | 16 + ...ferPrimitiveTest.double.Windows.Preview.cs | 16 + ...erPrimitiveTest.double.Windows.Preview.xml | 16 + ...fferPrimitiveTest.float.Unix.Compatible.cs | 8 + ...ferPrimitiveTest.float.Unix.Compatible.xml | 10 + ...dBufferPrimitiveTest.float.Unix.Default.cs | 8 + ...BufferPrimitiveTest.float.Unix.Default.xml | 10 + ...edBufferPrimitiveTest.float.Unix.Latest.cs | 16 + ...dBufferPrimitiveTest.float.Unix.Latest.xml | 16 + ...dBufferPrimitiveTest.float.Unix.Preview.cs | 16 + ...BufferPrimitiveTest.float.Unix.Preview.xml | 16 + ...rPrimitiveTest.float.Windows.Compatible.cs | 8 + ...PrimitiveTest.float.Windows.Compatible.xml | 10 + ...fferPrimitiveTest.float.Windows.Default.cs | 8 + ...ferPrimitiveTest.float.Windows.Default.xml | 10 + ...ufferPrimitiveTest.float.Windows.Latest.cs | 16 + ...fferPrimitiveTest.float.Windows.Latest.xml | 16 + ...fferPrimitiveTest.float.Windows.Preview.cs | 16 + ...ferPrimitiveTest.float.Windows.Preview.xml | 16 + ...BufferPrimitiveTest.int.Unix.Compatible.cs | 8 + ...ufferPrimitiveTest.int.Unix.Compatible.xml | 10 + ...zedBufferPrimitiveTest.int.Unix.Default.cs | 8 + ...edBufferPrimitiveTest.int.Unix.Default.xml | 10 + ...izedBufferPrimitiveTest.int.Unix.Latest.cs | 16 + ...zedBufferPrimitiveTest.int.Unix.Latest.xml | 16 + ...zedBufferPrimitiveTest.int.Unix.Preview.cs | 16 + ...edBufferPrimitiveTest.int.Unix.Preview.xml | 16 + ...ferPrimitiveTest.int.Windows.Compatible.cs | 8 + ...erPrimitiveTest.int.Windows.Compatible.xml | 10 + ...BufferPrimitiveTest.int.Windows.Default.cs | 8 + ...ufferPrimitiveTest.int.Windows.Default.xml | 10 + ...dBufferPrimitiveTest.int.Windows.Latest.cs | 16 + ...BufferPrimitiveTest.int.Windows.Latest.xml | 16 + ...BufferPrimitiveTest.int.Windows.Preview.cs | 16 + ...ufferPrimitiveTest.int.Windows.Preview.xml | 16 + ...PrimitiveTest.long long.Unix.Compatible.cs | 8 + ...rimitiveTest.long long.Unix.Compatible.xml | 10 + ...ferPrimitiveTest.long long.Unix.Default.cs | 8 + ...erPrimitiveTest.long long.Unix.Default.xml | 10 + ...fferPrimitiveTest.long long.Unix.Latest.cs | 16 + ...ferPrimitiveTest.long long.Unix.Latest.xml | 16 + ...ferPrimitiveTest.long long.Unix.Preview.cs | 16 + ...erPrimitiveTest.long long.Unix.Preview.xml | 16 + ...mitiveTest.long long.Windows.Compatible.cs | 8 + ...itiveTest.long long.Windows.Compatible.xml | 10 + ...PrimitiveTest.long long.Windows.Default.cs | 8 + ...rimitiveTest.long long.Windows.Default.xml | 10 + ...rPrimitiveTest.long long.Windows.Latest.cs | 16 + ...PrimitiveTest.long long.Windows.Latest.xml | 16 + ...PrimitiveTest.long long.Windows.Preview.cs | 16 + ...rimitiveTest.long long.Windows.Preview.xml | 16 + ...fferPrimitiveTest.short.Unix.Compatible.cs | 8 + ...ferPrimitiveTest.short.Unix.Compatible.xml | 10 + ...dBufferPrimitiveTest.short.Unix.Default.cs | 8 + ...BufferPrimitiveTest.short.Unix.Default.xml | 10 + ...edBufferPrimitiveTest.short.Unix.Latest.cs | 16 + ...dBufferPrimitiveTest.short.Unix.Latest.xml | 16 + ...dBufferPrimitiveTest.short.Unix.Preview.cs | 16 + ...BufferPrimitiveTest.short.Unix.Preview.xml | 16 + ...rPrimitiveTest.short.Windows.Compatible.cs | 8 + ...PrimitiveTest.short.Windows.Compatible.xml | 10 + ...fferPrimitiveTest.short.Windows.Default.cs | 8 + ...ferPrimitiveTest.short.Windows.Default.xml | 10 + ...ufferPrimitiveTest.short.Windows.Latest.cs | 16 + ...fferPrimitiveTest.short.Windows.Latest.xml | 16 + ...fferPrimitiveTest.short.Windows.Preview.cs | 16 + ...ferPrimitiveTest.short.Windows.Preview.xml | 16 + ...imitiveTest.signed char.Unix.Compatible.cs | 8 + ...mitiveTest.signed char.Unix.Compatible.xml | 10 + ...rPrimitiveTest.signed char.Unix.Default.cs | 8 + ...PrimitiveTest.signed char.Unix.Default.xml | 10 + ...erPrimitiveTest.signed char.Unix.Latest.cs | 16 + ...rPrimitiveTest.signed char.Unix.Latest.xml | 16 + ...rPrimitiveTest.signed char.Unix.Preview.cs | 16 + ...PrimitiveTest.signed char.Unix.Preview.xml | 16 + ...tiveTest.signed char.Windows.Compatible.cs | 8 + ...iveTest.signed char.Windows.Compatible.xml | 10 + ...imitiveTest.signed char.Windows.Default.cs | 8 + ...mitiveTest.signed char.Windows.Default.xml | 10 + ...rimitiveTest.signed char.Windows.Latest.cs | 16 + ...imitiveTest.signed char.Windows.Latest.xml | 16 + ...imitiveTest.signed char.Windows.Preview.cs | 16 + ...mitiveTest.signed char.Windows.Preview.xml | 16 + ...itiveTest.unsigned char.Unix.Compatible.cs | 8 + ...tiveTest.unsigned char.Unix.Compatible.xml | 10 + ...rimitiveTest.unsigned char.Unix.Default.cs | 8 + ...imitiveTest.unsigned char.Unix.Default.xml | 10 + ...PrimitiveTest.unsigned char.Unix.Latest.cs | 16 + ...rimitiveTest.unsigned char.Unix.Latest.xml | 16 + ...rimitiveTest.unsigned char.Unix.Preview.cs | 16 + ...imitiveTest.unsigned char.Unix.Preview.xml | 16 + ...veTest.unsigned char.Windows.Compatible.cs | 8 + ...eTest.unsigned char.Windows.Compatible.xml | 10 + ...itiveTest.unsigned char.Windows.Default.cs | 8 + ...tiveTest.unsigned char.Windows.Default.xml | 10 + ...mitiveTest.unsigned char.Windows.Latest.cs | 16 + ...itiveTest.unsigned char.Windows.Latest.xml | 16 + ...itiveTest.unsigned char.Windows.Preview.cs | 16 + ...tiveTest.unsigned char.Windows.Preview.xml | 16 + ...mitiveTest.unsigned int.Unix.Compatible.cs | 8 + ...itiveTest.unsigned int.Unix.Compatible.xml | 10 + ...PrimitiveTest.unsigned int.Unix.Default.cs | 8 + ...rimitiveTest.unsigned int.Unix.Default.xml | 10 + ...rPrimitiveTest.unsigned int.Unix.Latest.cs | 16 + ...PrimitiveTest.unsigned int.Unix.Latest.xml | 16 + ...PrimitiveTest.unsigned int.Unix.Preview.cs | 16 + ...rimitiveTest.unsigned int.Unix.Preview.xml | 16 + ...iveTest.unsigned int.Windows.Compatible.cs | 8 + ...veTest.unsigned int.Windows.Compatible.xml | 10 + ...mitiveTest.unsigned int.Windows.Default.cs | 8 + ...itiveTest.unsigned int.Windows.Default.xml | 10 + ...imitiveTest.unsigned int.Windows.Latest.cs | 16 + ...mitiveTest.unsigned int.Windows.Latest.xml | 16 + ...mitiveTest.unsigned int.Windows.Preview.cs | 16 + ...itiveTest.unsigned int.Windows.Preview.xml | 16 + ...Test.unsigned long long.Unix.Compatible.cs | 8 + ...est.unsigned long long.Unix.Compatible.xml | 10 + ...iveTest.unsigned long long.Unix.Default.cs | 8 + ...veTest.unsigned long long.Unix.Default.xml | 10 + ...tiveTest.unsigned long long.Unix.Latest.cs | 16 + ...iveTest.unsigned long long.Unix.Latest.xml | 16 + ...iveTest.unsigned long long.Unix.Preview.cs | 16 + ...veTest.unsigned long long.Unix.Preview.xml | 16 + ...t.unsigned long long.Windows.Compatible.cs | 8 + ....unsigned long long.Windows.Compatible.xml | 10 + ...Test.unsigned long long.Windows.Default.cs | 8 + ...est.unsigned long long.Windows.Default.xml | 10 + ...eTest.unsigned long long.Windows.Latest.cs | 16 + ...Test.unsigned long long.Windows.Latest.xml | 16 + ...Test.unsigned long long.Windows.Preview.cs | 16 + ...est.unsigned long long.Windows.Preview.xml | 16 + ...tiveTest.unsigned short.Unix.Compatible.cs | 8 + ...iveTest.unsigned short.Unix.Compatible.xml | 10 + ...imitiveTest.unsigned short.Unix.Default.cs | 8 + ...mitiveTest.unsigned short.Unix.Default.xml | 10 + ...rimitiveTest.unsigned short.Unix.Latest.cs | 16 + ...imitiveTest.unsigned short.Unix.Latest.xml | 16 + ...imitiveTest.unsigned short.Unix.Preview.cs | 16 + ...mitiveTest.unsigned short.Unix.Preview.xml | 16 + ...eTest.unsigned short.Windows.Compatible.cs | 8 + ...Test.unsigned short.Windows.Compatible.xml | 10 + ...tiveTest.unsigned short.Windows.Default.cs | 8 + ...iveTest.unsigned short.Windows.Default.xml | 10 + ...itiveTest.unsigned short.Windows.Latest.cs | 16 + ...tiveTest.unsigned short.Windows.Latest.xml | 16 + ...tiveTest.unsigned short.Windows.Preview.cs | 16 + ...iveTest.unsigned short.Windows.Preview.xml | 16 + ...itiveTypedefTest.double.Unix.Compatible.cs | 8 + ...tiveTypedefTest.double.Unix.Compatible.xml | 10 + ...rimitiveTypedefTest.double.Unix.Default.cs | 8 + ...imitiveTypedefTest.double.Unix.Default.xml | 10 + ...PrimitiveTypedefTest.double.Unix.Latest.cs | 16 + ...rimitiveTypedefTest.double.Unix.Latest.xml | 16 + ...rimitiveTypedefTest.double.Unix.Preview.cs | 16 + ...imitiveTypedefTest.double.Unix.Preview.xml | 16 + ...veTypedefTest.double.Windows.Compatible.cs | 8 + ...eTypedefTest.double.Windows.Compatible.xml | 10 + ...itiveTypedefTest.double.Windows.Default.cs | 8 + ...tiveTypedefTest.double.Windows.Default.xml | 10 + ...mitiveTypedefTest.double.Windows.Latest.cs | 16 + ...itiveTypedefTest.double.Windows.Latest.xml | 16 + ...itiveTypedefTest.double.Windows.Preview.cs | 16 + ...tiveTypedefTest.double.Windows.Preview.xml | 16 + ...mitiveTypedefTest.float.Unix.Compatible.cs | 8 + ...itiveTypedefTest.float.Unix.Compatible.xml | 10 + ...PrimitiveTypedefTest.float.Unix.Default.cs | 8 + ...rimitiveTypedefTest.float.Unix.Default.xml | 10 + ...rPrimitiveTypedefTest.float.Unix.Latest.cs | 16 + ...PrimitiveTypedefTest.float.Unix.Latest.xml | 16 + ...PrimitiveTypedefTest.float.Unix.Preview.cs | 16 + ...rimitiveTypedefTest.float.Unix.Preview.xml | 16 + ...iveTypedefTest.float.Windows.Compatible.cs | 8 + ...veTypedefTest.float.Windows.Compatible.xml | 10 + ...mitiveTypedefTest.float.Windows.Default.cs | 8 + ...itiveTypedefTest.float.Windows.Default.xml | 10 + ...imitiveTypedefTest.float.Windows.Latest.cs | 16 + ...mitiveTypedefTest.float.Windows.Latest.xml | 16 + ...mitiveTypedefTest.float.Windows.Preview.cs | 16 + ...itiveTypedefTest.float.Windows.Preview.xml | 16 + ...rimitiveTypedefTest.int.Unix.Compatible.cs | 8 + ...imitiveTypedefTest.int.Unix.Compatible.xml | 10 + ...erPrimitiveTypedefTest.int.Unix.Default.cs | 8 + ...rPrimitiveTypedefTest.int.Unix.Default.xml | 10 + ...ferPrimitiveTypedefTest.int.Unix.Latest.cs | 16 + ...erPrimitiveTypedefTest.int.Unix.Latest.xml | 16 + ...erPrimitiveTypedefTest.int.Unix.Preview.cs | 16 + ...rPrimitiveTypedefTest.int.Unix.Preview.xml | 16 + ...itiveTypedefTest.int.Windows.Compatible.cs | 8 + ...tiveTypedefTest.int.Windows.Compatible.xml | 10 + ...rimitiveTypedefTest.int.Windows.Default.cs | 8 + ...imitiveTypedefTest.int.Windows.Default.xml | 10 + ...PrimitiveTypedefTest.int.Windows.Latest.cs | 16 + ...rimitiveTypedefTest.int.Windows.Latest.xml | 16 + ...rimitiveTypedefTest.int.Windows.Preview.cs | 16 + ...imitiveTypedefTest.int.Windows.Preview.xml | 16 + ...veTypedefTest.long long.Unix.Compatible.cs | 8 + ...eTypedefTest.long long.Unix.Compatible.xml | 10 + ...itiveTypedefTest.long long.Unix.Default.cs | 8 + ...tiveTypedefTest.long long.Unix.Default.xml | 10 + ...mitiveTypedefTest.long long.Unix.Latest.cs | 16 + ...itiveTypedefTest.long long.Unix.Latest.xml | 16 + ...itiveTypedefTest.long long.Unix.Preview.cs | 16 + ...tiveTypedefTest.long long.Unix.Preview.xml | 16 + ...ypedefTest.long long.Windows.Compatible.cs | 8 + ...pedefTest.long long.Windows.Compatible.xml | 10 + ...veTypedefTest.long long.Windows.Default.cs | 8 + ...eTypedefTest.long long.Windows.Default.xml | 10 + ...iveTypedefTest.long long.Windows.Latest.cs | 16 + ...veTypedefTest.long long.Windows.Latest.xml | 16 + ...veTypedefTest.long long.Windows.Preview.cs | 16 + ...eTypedefTest.long long.Windows.Preview.xml | 16 + ...mitiveTypedefTest.short.Unix.Compatible.cs | 8 + ...itiveTypedefTest.short.Unix.Compatible.xml | 10 + ...PrimitiveTypedefTest.short.Unix.Default.cs | 8 + ...rimitiveTypedefTest.short.Unix.Default.xml | 10 + ...rPrimitiveTypedefTest.short.Unix.Latest.cs | 16 + ...PrimitiveTypedefTest.short.Unix.Latest.xml | 16 + ...PrimitiveTypedefTest.short.Unix.Preview.cs | 16 + ...rimitiveTypedefTest.short.Unix.Preview.xml | 16 + ...iveTypedefTest.short.Windows.Compatible.cs | 8 + ...veTypedefTest.short.Windows.Compatible.xml | 10 + ...mitiveTypedefTest.short.Windows.Default.cs | 8 + ...itiveTypedefTest.short.Windows.Default.xml | 10 + ...imitiveTypedefTest.short.Windows.Latest.cs | 16 + ...mitiveTypedefTest.short.Windows.Latest.xml | 16 + ...mitiveTypedefTest.short.Windows.Preview.cs | 16 + ...itiveTypedefTest.short.Windows.Preview.xml | 16 + ...TypedefTest.signed char.Unix.Compatible.cs | 8 + ...ypedefTest.signed char.Unix.Compatible.xml | 10 + ...iveTypedefTest.signed char.Unix.Default.cs | 8 + ...veTypedefTest.signed char.Unix.Default.xml | 10 + ...tiveTypedefTest.signed char.Unix.Latest.cs | 16 + ...iveTypedefTest.signed char.Unix.Latest.xml | 16 + ...iveTypedefTest.signed char.Unix.Preview.cs | 16 + ...veTypedefTest.signed char.Unix.Preview.xml | 16 + ...edefTest.signed char.Windows.Compatible.cs | 8 + ...defTest.signed char.Windows.Compatible.xml | 10 + ...TypedefTest.signed char.Windows.Default.cs | 8 + ...ypedefTest.signed char.Windows.Default.xml | 10 + ...eTypedefTest.signed char.Windows.Latest.cs | 16 + ...TypedefTest.signed char.Windows.Latest.xml | 16 + ...TypedefTest.signed char.Windows.Preview.cs | 16 + ...ypedefTest.signed char.Windows.Preview.xml | 16 + ...pedefTest.unsigned char.Unix.Compatible.cs | 8 + ...edefTest.unsigned char.Unix.Compatible.xml | 10 + ...eTypedefTest.unsigned char.Unix.Default.cs | 8 + ...TypedefTest.unsigned char.Unix.Default.xml | 10 + ...veTypedefTest.unsigned char.Unix.Latest.cs | 16 + ...eTypedefTest.unsigned char.Unix.Latest.xml | 16 + ...eTypedefTest.unsigned char.Unix.Preview.cs | 16 + ...TypedefTest.unsigned char.Unix.Preview.xml | 16 + ...efTest.unsigned char.Windows.Compatible.cs | 8 + ...fTest.unsigned char.Windows.Compatible.xml | 10 + ...pedefTest.unsigned char.Windows.Default.cs | 8 + ...edefTest.unsigned char.Windows.Default.xml | 10 + ...ypedefTest.unsigned char.Windows.Latest.cs | 16 + ...pedefTest.unsigned char.Windows.Latest.xml | 16 + ...pedefTest.unsigned char.Windows.Preview.cs | 16 + ...edefTest.unsigned char.Windows.Preview.xml | 16 + ...ypedefTest.unsigned int.Unix.Compatible.cs | 8 + ...pedefTest.unsigned int.Unix.Compatible.xml | 10 + ...veTypedefTest.unsigned int.Unix.Default.cs | 8 + ...eTypedefTest.unsigned int.Unix.Default.xml | 10 + ...iveTypedefTest.unsigned int.Unix.Latest.cs | 16 + ...veTypedefTest.unsigned int.Unix.Latest.xml | 16 + ...veTypedefTest.unsigned int.Unix.Preview.cs | 16 + ...eTypedefTest.unsigned int.Unix.Preview.xml | 16 + ...defTest.unsigned int.Windows.Compatible.cs | 8 + ...efTest.unsigned int.Windows.Compatible.xml | 10 + ...ypedefTest.unsigned int.Windows.Default.cs | 8 + ...pedefTest.unsigned int.Windows.Default.xml | 10 + ...TypedefTest.unsigned int.Windows.Latest.cs | 16 + ...ypedefTest.unsigned int.Windows.Latest.xml | 16 + ...ypedefTest.unsigned int.Windows.Preview.cs | 16 + ...pedefTest.unsigned int.Windows.Preview.xml | 16 + ...Test.unsigned long long.Unix.Compatible.cs | 8 + ...est.unsigned long long.Unix.Compatible.xml | 10 + ...defTest.unsigned long long.Unix.Default.cs | 8 + ...efTest.unsigned long long.Unix.Default.xml | 10 + ...edefTest.unsigned long long.Unix.Latest.cs | 16 + ...defTest.unsigned long long.Unix.Latest.xml | 16 + ...defTest.unsigned long long.Unix.Preview.cs | 16 + ...efTest.unsigned long long.Unix.Preview.xml | 16 + ...t.unsigned long long.Windows.Compatible.cs | 8 + ....unsigned long long.Windows.Compatible.xml | 10 + ...Test.unsigned long long.Windows.Default.cs | 8 + ...est.unsigned long long.Windows.Default.xml | 10 + ...fTest.unsigned long long.Windows.Latest.cs | 16 + ...Test.unsigned long long.Windows.Latest.xml | 16 + ...Test.unsigned long long.Windows.Preview.cs | 16 + ...est.unsigned long long.Windows.Preview.xml | 16 + ...edefTest.unsigned short.Unix.Compatible.cs | 8 + ...defTest.unsigned short.Unix.Compatible.xml | 10 + ...TypedefTest.unsigned short.Unix.Default.cs | 8 + ...ypedefTest.unsigned short.Unix.Default.xml | 10 + ...eTypedefTest.unsigned short.Unix.Latest.cs | 16 + ...TypedefTest.unsigned short.Unix.Latest.xml | 16 + ...TypedefTest.unsigned short.Unix.Preview.cs | 16 + ...ypedefTest.unsigned short.Unix.Preview.xml | 16 + ...fTest.unsigned short.Windows.Compatible.cs | 8 + ...Test.unsigned short.Windows.Compatible.xml | 10 + ...edefTest.unsigned short.Windows.Default.cs | 8 + ...defTest.unsigned short.Windows.Default.xml | 10 + ...pedefTest.unsigned short.Windows.Latest.cs | 16 + ...edefTest.unsigned short.Windows.Latest.xml | 16 + ...edefTest.unsigned short.Windows.Preview.cs | 16 + ...defTest.unsigned short.Windows.Preview.xml | 16 + ...arationTest.GuidTest.Windows.Compatible.cs | 24 + ...rationTest.GuidTest.Windows.Compatible.xml | 19 + ...eclarationTest.GuidTest.Windows.Default.cs | 24 + ...clarationTest.GuidTest.Windows.Default.xml | 19 + ...DeclarationTest.GuidTest.Windows.Latest.cs | 24 + ...eclarationTest.GuidTest.Windows.Latest.xml | 19 + ...eclarationTest.GuidTest.Windows.Preview.cs | 24 + ...clarationTest.GuidTest.Windows.Preview.xml | 19 + ...eteArraySizeTest.double.Unix.Compatible.cs | 8 + ...teArraySizeTest.double.Unix.Compatible.xml | 10 + ...mpleteArraySizeTest.double.Unix.Default.cs | 8 + ...pleteArraySizeTest.double.Unix.Default.xml | 10 + ...ompleteArraySizeTest.double.Unix.Latest.cs | 29 + ...mpleteArraySizeTest.double.Unix.Latest.xml | 31 + ...mpleteArraySizeTest.double.Unix.Preview.cs | 29 + ...pleteArraySizeTest.double.Unix.Preview.xml | 31 + ...ArraySizeTest.double.Windows.Compatible.cs | 8 + ...rraySizeTest.double.Windows.Compatible.xml | 10 + ...eteArraySizeTest.double.Windows.Default.cs | 8 + ...teArraySizeTest.double.Windows.Default.xml | 10 + ...leteArraySizeTest.double.Windows.Latest.cs | 29 + ...eteArraySizeTest.double.Windows.Latest.xml | 31 + ...eteArraySizeTest.double.Windows.Preview.cs | 29 + ...teArraySizeTest.double.Windows.Preview.xml | 31 + ...leteArraySizeTest.float.Unix.Compatible.cs | 8 + ...eteArraySizeTest.float.Unix.Compatible.xml | 10 + ...ompleteArraySizeTest.float.Unix.Default.cs | 8 + ...mpleteArraySizeTest.float.Unix.Default.xml | 10 + ...completeArraySizeTest.float.Unix.Latest.cs | 29 + ...ompleteArraySizeTest.float.Unix.Latest.xml | 31 + ...ompleteArraySizeTest.float.Unix.Preview.cs | 29 + ...mpleteArraySizeTest.float.Unix.Preview.xml | 31 + ...eArraySizeTest.float.Windows.Compatible.cs | 8 + ...ArraySizeTest.float.Windows.Compatible.xml | 10 + ...leteArraySizeTest.float.Windows.Default.cs | 8 + ...eteArraySizeTest.float.Windows.Default.xml | 10 + ...pleteArraySizeTest.float.Windows.Latest.cs | 29 + ...leteArraySizeTest.float.Windows.Latest.xml | 31 + ...leteArraySizeTest.float.Windows.Preview.cs | 29 + ...eteArraySizeTest.float.Windows.Preview.xml | 31 + ...mpleteArraySizeTest.int.Unix.Compatible.cs | 8 + ...pleteArraySizeTest.int.Unix.Compatible.xml | 10 + ...ncompleteArraySizeTest.int.Unix.Default.cs | 8 + ...completeArraySizeTest.int.Unix.Default.xml | 10 + ...IncompleteArraySizeTest.int.Unix.Latest.cs | 29 + ...ncompleteArraySizeTest.int.Unix.Latest.xml | 31 + ...ncompleteArraySizeTest.int.Unix.Preview.cs | 29 + ...completeArraySizeTest.int.Unix.Preview.xml | 31 + ...eteArraySizeTest.int.Windows.Compatible.cs | 8 + ...teArraySizeTest.int.Windows.Compatible.xml | 10 + ...mpleteArraySizeTest.int.Windows.Default.cs | 8 + ...pleteArraySizeTest.int.Windows.Default.xml | 10 + ...ompleteArraySizeTest.int.Windows.Latest.cs | 29 + ...mpleteArraySizeTest.int.Windows.Latest.xml | 31 + ...mpleteArraySizeTest.int.Windows.Preview.cs | 29 + ...pleteArraySizeTest.int.Windows.Preview.xml | 31 + ...leteArraySizeTest.short.Unix.Compatible.cs | 8 + ...eteArraySizeTest.short.Unix.Compatible.xml | 10 + ...ompleteArraySizeTest.short.Unix.Default.cs | 8 + ...mpleteArraySizeTest.short.Unix.Default.xml | 10 + ...completeArraySizeTest.short.Unix.Latest.cs | 29 + ...ompleteArraySizeTest.short.Unix.Latest.xml | 31 + ...ompleteArraySizeTest.short.Unix.Preview.cs | 29 + ...mpleteArraySizeTest.short.Unix.Preview.xml | 31 + ...eArraySizeTest.short.Windows.Compatible.cs | 8 + ...ArraySizeTest.short.Windows.Compatible.xml | 10 + ...leteArraySizeTest.short.Windows.Default.cs | 8 + ...eteArraySizeTest.short.Windows.Default.xml | 10 + ...pleteArraySizeTest.short.Windows.Latest.cs | 29 + ...leteArraySizeTest.short.Windows.Latest.xml | 31 + ...leteArraySizeTest.short.Windows.Preview.cs | 29 + ...eteArraySizeTest.short.Windows.Preview.xml | 31 + ...ionTest.InheritanceTest.Unix.Compatible.cs | 28 + ...onTest.InheritanceTest.Unix.Compatible.xml | 35 + ...rationTest.InheritanceTest.Unix.Default.cs | 28 + ...ationTest.InheritanceTest.Unix.Default.xml | 35 + ...arationTest.InheritanceTest.Unix.Latest.cs | 28 + ...rationTest.InheritanceTest.Unix.Latest.xml | 35 + ...rationTest.InheritanceTest.Unix.Preview.cs | 28 + ...ationTest.InheritanceTest.Unix.Preview.xml | 35 + ...Test.InheritanceTest.Windows.Compatible.cs | 28 + ...est.InheritanceTest.Windows.Compatible.xml | 35 + ...ionTest.InheritanceTest.Windows.Default.cs | 28 + ...onTest.InheritanceTest.Windows.Default.xml | 35 + ...tionTest.InheritanceTest.Windows.Latest.cs | 28 + ...ionTest.InheritanceTest.Windows.Latest.xml | 35 + ...ionTest.InheritanceTest.Windows.Preview.cs | 28 + ...onTest.InheritanceTest.Windows.Preview.xml | 35 + ...nheritanceAttributeTest.Unix.Compatible.cs | 29 + ...heritanceAttributeTest.Unix.Compatible.xml | 35 + ...veInheritanceAttributeTest.Unix.Default.cs | 29 + ...eInheritanceAttributeTest.Unix.Default.xml | 35 + ...iveInheritanceAttributeTest.Unix.Latest.cs | 29 + ...veInheritanceAttributeTest.Unix.Latest.xml | 35 + ...veInheritanceAttributeTest.Unix.Preview.cs | 29 + ...eInheritanceAttributeTest.Unix.Preview.xml | 35 + ...ritanceAttributeTest.Windows.Compatible.cs | 29 + ...itanceAttributeTest.Windows.Compatible.xml | 35 + ...nheritanceAttributeTest.Windows.Default.cs | 29 + ...heritanceAttributeTest.Windows.Default.xml | 35 + ...InheritanceAttributeTest.Windows.Latest.cs | 29 + ...nheritanceAttributeTest.Windows.Latest.xml | 35 + ...nheritanceAttributeTest.Windows.Preview.cs | 29 + ...heritanceAttributeTest.Windows.Preview.xml | 35 + ...tedAnonymousTest.double.Unix.Compatible.cs | 175 ++ ...edAnonymousTest.double.Unix.Compatible.xml | 165 ++ ...NestedAnonymousTest.double.Unix.Default.cs | 151 ++ ...estedAnonymousTest.double.Unix.Default.xml | 142 ++ ....NestedAnonymousTest.double.Unix.Latest.cs | 155 ++ ...NestedAnonymousTest.double.Unix.Latest.xml | 127 ++ ...NestedAnonymousTest.double.Unix.Preview.cs | 155 ++ ...estedAnonymousTest.double.Unix.Preview.xml | 127 ++ ...AnonymousTest.double.Windows.Compatible.cs | 175 ++ ...nonymousTest.double.Windows.Compatible.xml | 165 ++ ...tedAnonymousTest.double.Windows.Default.cs | 151 ++ ...edAnonymousTest.double.Windows.Default.xml | 142 ++ ...stedAnonymousTest.double.Windows.Latest.cs | 155 ++ ...tedAnonymousTest.double.Windows.Latest.xml | 127 ++ ...tedAnonymousTest.double.Windows.Preview.cs | 155 ++ ...edAnonymousTest.double.Windows.Preview.xml | 127 ++ ...stedAnonymousTest.float.Unix.Compatible.cs | 175 ++ ...tedAnonymousTest.float.Unix.Compatible.xml | 165 ++ ....NestedAnonymousTest.float.Unix.Default.cs | 151 ++ ...NestedAnonymousTest.float.Unix.Default.xml | 142 ++ ...t.NestedAnonymousTest.float.Unix.Latest.cs | 155 ++ ....NestedAnonymousTest.float.Unix.Latest.xml | 127 ++ ....NestedAnonymousTest.float.Unix.Preview.cs | 155 ++ ...NestedAnonymousTest.float.Unix.Preview.xml | 127 ++ ...dAnonymousTest.float.Windows.Compatible.cs | 175 ++ ...AnonymousTest.float.Windows.Compatible.xml | 165 ++ ...stedAnonymousTest.float.Windows.Default.cs | 151 ++ ...tedAnonymousTest.float.Windows.Default.xml | 142 ++ ...estedAnonymousTest.float.Windows.Latest.cs | 155 ++ ...stedAnonymousTest.float.Windows.Latest.xml | 127 ++ ...stedAnonymousTest.float.Windows.Preview.cs | 155 ++ ...tedAnonymousTest.float.Windows.Preview.xml | 127 ++ ...NestedAnonymousTest.int.Unix.Compatible.cs | 175 ++ ...estedAnonymousTest.int.Unix.Compatible.xml | 165 ++ ...st.NestedAnonymousTest.int.Unix.Default.cs | 151 ++ ...t.NestedAnonymousTest.int.Unix.Default.xml | 142 ++ ...est.NestedAnonymousTest.int.Unix.Latest.cs | 155 ++ ...st.NestedAnonymousTest.int.Unix.Latest.xml | 127 ++ ...st.NestedAnonymousTest.int.Unix.Preview.cs | 155 ++ ...t.NestedAnonymousTest.int.Unix.Preview.xml | 127 ++ ...tedAnonymousTest.int.Windows.Compatible.cs | 175 ++ ...edAnonymousTest.int.Windows.Compatible.xml | 165 ++ ...NestedAnonymousTest.int.Windows.Default.cs | 151 ++ ...estedAnonymousTest.int.Windows.Default.xml | 142 ++ ....NestedAnonymousTest.int.Windows.Latest.cs | 155 ++ ...NestedAnonymousTest.int.Windows.Latest.xml | 127 ++ ...NestedAnonymousTest.int.Windows.Preview.cs | 155 ++ ...estedAnonymousTest.int.Windows.Preview.xml | 127 ++ ...stedAnonymousTest.short.Unix.Compatible.cs | 175 ++ ...tedAnonymousTest.short.Unix.Compatible.xml | 165 ++ ....NestedAnonymousTest.short.Unix.Default.cs | 151 ++ ...NestedAnonymousTest.short.Unix.Default.xml | 142 ++ ...t.NestedAnonymousTest.short.Unix.Latest.cs | 155 ++ ....NestedAnonymousTest.short.Unix.Latest.xml | 127 ++ ....NestedAnonymousTest.short.Unix.Preview.cs | 155 ++ ...NestedAnonymousTest.short.Unix.Preview.xml | 127 ++ ...dAnonymousTest.short.Windows.Compatible.cs | 175 ++ ...AnonymousTest.short.Windows.Compatible.xml | 165 ++ ...stedAnonymousTest.short.Windows.Default.cs | 151 ++ ...tedAnonymousTest.short.Windows.Default.xml | 142 ++ ...estedAnonymousTest.short.Windows.Latest.cs | 155 ++ ...stedAnonymousTest.short.Windows.Latest.xml | 127 ++ ...stedAnonymousTest.short.Windows.Preview.cs | 155 ++ ...tedAnonymousTest.short.Windows.Preview.xml | 127 ++ ...onymousWithBitfieldTest.Unix.Compatible.cs | 103 + ...nymousWithBitfieldTest.Unix.Compatible.xml | 88 + ...dAnonymousWithBitfieldTest.Unix.Default.cs | 99 + ...AnonymousWithBitfieldTest.Unix.Default.xml | 82 + ...edAnonymousWithBitfieldTest.Unix.Latest.cs | 101 + ...dAnonymousWithBitfieldTest.Unix.Latest.xml | 82 + ...dAnonymousWithBitfieldTest.Unix.Preview.cs | 101 + ...AnonymousWithBitfieldTest.Unix.Preview.xml | 82 + ...mousWithBitfieldTest.Windows.Compatible.cs | 103 + ...ousWithBitfieldTest.Windows.Compatible.xml | 88 + ...onymousWithBitfieldTest.Windows.Default.cs | 99 + ...nymousWithBitfieldTest.Windows.Default.xml | 82 + ...nonymousWithBitfieldTest.Windows.Latest.cs | 101 + ...onymousWithBitfieldTest.Windows.Latest.xml | 82 + ...onymousWithBitfieldTest.Windows.Preview.cs | 101 + ...nymousWithBitfieldTest.Windows.Preview.xml | 82 + ...nTest.NestedTest.double.Unix.Compatible.cs | 22 + ...Test.NestedTest.double.Unix.Compatible.xml | 30 + ...tionTest.NestedTest.double.Unix.Default.cs | 22 + ...ionTest.NestedTest.double.Unix.Default.xml | 30 + ...ationTest.NestedTest.double.Unix.Latest.cs | 22 + ...tionTest.NestedTest.double.Unix.Latest.xml | 30 + ...tionTest.NestedTest.double.Unix.Preview.cs | 22 + ...ionTest.NestedTest.double.Unix.Preview.xml | 30 + ...st.NestedTest.double.Windows.Compatible.cs | 22 + ...t.NestedTest.double.Windows.Compatible.xml | 30 + ...nTest.NestedTest.double.Windows.Default.cs | 22 + ...Test.NestedTest.double.Windows.Default.xml | 30 + ...onTest.NestedTest.double.Windows.Latest.cs | 22 + ...nTest.NestedTest.double.Windows.Latest.xml | 30 + ...nTest.NestedTest.double.Windows.Preview.cs | 22 + ...Test.NestedTest.double.Windows.Preview.xml | 30 + ...onTest.NestedTest.float.Unix.Compatible.cs | 22 + ...nTest.NestedTest.float.Unix.Compatible.xml | 30 + ...ationTest.NestedTest.float.Unix.Default.cs | 22 + ...tionTest.NestedTest.float.Unix.Default.xml | 30 + ...rationTest.NestedTest.float.Unix.Latest.cs | 22 + ...ationTest.NestedTest.float.Unix.Latest.xml | 30 + ...ationTest.NestedTest.float.Unix.Preview.cs | 22 + ...tionTest.NestedTest.float.Unix.Preview.xml | 30 + ...est.NestedTest.float.Windows.Compatible.cs | 22 + ...st.NestedTest.float.Windows.Compatible.xml | 30 + ...onTest.NestedTest.float.Windows.Default.cs | 22 + ...nTest.NestedTest.float.Windows.Default.xml | 30 + ...ionTest.NestedTest.float.Windows.Latest.cs | 22 + ...onTest.NestedTest.float.Windows.Latest.xml | 30 + ...onTest.NestedTest.float.Windows.Preview.cs | 22 + ...nTest.NestedTest.float.Windows.Preview.xml | 30 + ...tionTest.NestedTest.int.Unix.Compatible.cs | 22 + ...ionTest.NestedTest.int.Unix.Compatible.xml | 30 + ...arationTest.NestedTest.int.Unix.Default.cs | 22 + ...rationTest.NestedTest.int.Unix.Default.xml | 30 + ...larationTest.NestedTest.int.Unix.Latest.cs | 22 + ...arationTest.NestedTest.int.Unix.Latest.xml | 30 + ...arationTest.NestedTest.int.Unix.Preview.cs | 22 + ...rationTest.NestedTest.int.Unix.Preview.xml | 30 + ...nTest.NestedTest.int.Windows.Compatible.cs | 22 + ...Test.NestedTest.int.Windows.Compatible.xml | 30 + ...tionTest.NestedTest.int.Windows.Default.cs | 22 + ...ionTest.NestedTest.int.Windows.Default.xml | 30 + ...ationTest.NestedTest.int.Windows.Latest.cs | 22 + ...tionTest.NestedTest.int.Windows.Latest.xml | 30 + ...tionTest.NestedTest.int.Windows.Preview.cs | 22 + ...ionTest.NestedTest.int.Windows.Preview.xml | 30 + ...onTest.NestedTest.short.Unix.Compatible.cs | 22 + ...nTest.NestedTest.short.Unix.Compatible.xml | 30 + ...ationTest.NestedTest.short.Unix.Default.cs | 22 + ...tionTest.NestedTest.short.Unix.Default.xml | 30 + ...rationTest.NestedTest.short.Unix.Latest.cs | 22 + ...ationTest.NestedTest.short.Unix.Latest.xml | 30 + ...ationTest.NestedTest.short.Unix.Preview.cs | 22 + ...tionTest.NestedTest.short.Unix.Preview.xml | 30 + ...est.NestedTest.short.Windows.Compatible.cs | 22 + ...st.NestedTest.short.Windows.Compatible.xml | 30 + ...onTest.NestedTest.short.Windows.Default.cs | 22 + ...nTest.NestedTest.short.Windows.Default.xml | 30 + ...ionTest.NestedTest.short.Windows.Latest.cs | 22 + ...onTest.NestedTest.short.Windows.Latest.xml | 30 + ...onTest.NestedTest.short.Windows.Preview.cs | 22 + ...nTest.NestedTest.short.Windows.Preview.xml | 30 + ...NativeTypeNameTest.bool.Unix.Compatible.cs | 29 + ...ativeTypeNameTest.bool.Unix.Compatible.xml | 30 + ...ithNativeTypeNameTest.bool.Unix.Default.cs | 29 + ...thNativeTypeNameTest.bool.Unix.Default.xml | 30 + ...WithNativeTypeNameTest.bool.Unix.Latest.cs | 29 + ...ithNativeTypeNameTest.bool.Unix.Latest.xml | 30 + ...ithNativeTypeNameTest.bool.Unix.Preview.cs | 29 + ...thNativeTypeNameTest.bool.Unix.Preview.xml | 30 + ...iveTypeNameTest.bool.Windows.Compatible.cs | 29 + ...veTypeNameTest.bool.Windows.Compatible.xml | 30 + ...NativeTypeNameTest.bool.Windows.Default.cs | 29 + ...ativeTypeNameTest.bool.Windows.Default.xml | 30 + ...hNativeTypeNameTest.bool.Windows.Latest.cs | 29 + ...NativeTypeNameTest.bool.Windows.Latest.xml | 30 + ...NativeTypeNameTest.bool.Windows.Preview.cs | 29 + ...ativeTypeNameTest.bool.Windows.Preview.xml | 30 + ...eTypeNameTest.long long.Unix.Compatible.cs | 29 + ...TypeNameTest.long long.Unix.Compatible.xml | 30 + ...tiveTypeNameTest.long long.Unix.Default.cs | 29 + ...iveTypeNameTest.long long.Unix.Default.xml | 30 + ...ativeTypeNameTest.long long.Unix.Latest.cs | 29 + ...tiveTypeNameTest.long long.Unix.Latest.xml | 30 + ...tiveTypeNameTest.long long.Unix.Preview.cs | 29 + ...iveTypeNameTest.long long.Unix.Preview.xml | 30 + ...peNameTest.long long.Windows.Compatible.cs | 29 + ...eNameTest.long long.Windows.Compatible.xml | 30 + ...eTypeNameTest.long long.Windows.Default.cs | 29 + ...TypeNameTest.long long.Windows.Default.xml | 30 + ...veTypeNameTest.long long.Windows.Latest.cs | 29 + ...eTypeNameTest.long long.Windows.Latest.xml | 30 + ...eTypeNameTest.long long.Windows.Preview.cs | 29 + ...TypeNameTest.long long.Windows.Preview.xml | 30 + ...ypeNameTest.signed char.Unix.Compatible.cs | 29 + ...peNameTest.signed char.Unix.Compatible.xml | 30 + ...veTypeNameTest.signed char.Unix.Default.cs | 29 + ...eTypeNameTest.signed char.Unix.Default.xml | 30 + ...iveTypeNameTest.signed char.Unix.Latest.cs | 29 + ...veTypeNameTest.signed char.Unix.Latest.xml | 30 + ...veTypeNameTest.signed char.Unix.Preview.cs | 29 + ...eTypeNameTest.signed char.Unix.Preview.xml | 30 + ...NameTest.signed char.Windows.Compatible.cs | 29 + ...ameTest.signed char.Windows.Compatible.xml | 30 + ...ypeNameTest.signed char.Windows.Default.cs | 29 + ...peNameTest.signed char.Windows.Default.xml | 30 + ...TypeNameTest.signed char.Windows.Latest.cs | 29 + ...ypeNameTest.signed char.Windows.Latest.xml | 30 + ...ypeNameTest.signed char.Windows.Preview.cs | 29 + ...peNameTest.signed char.Windows.Preview.xml | 30 + ...eNameTest.unsigned char.Unix.Compatible.cs | 29 + ...NameTest.unsigned char.Unix.Compatible.xml | 30 + ...TypeNameTest.unsigned char.Unix.Default.cs | 29 + ...ypeNameTest.unsigned char.Unix.Default.xml | 30 + ...eTypeNameTest.unsigned char.Unix.Latest.cs | 29 + ...TypeNameTest.unsigned char.Unix.Latest.xml | 30 + ...TypeNameTest.unsigned char.Unix.Preview.cs | 29 + ...ypeNameTest.unsigned char.Unix.Preview.xml | 30 + ...meTest.unsigned char.Windows.Compatible.cs | 29 + ...eTest.unsigned char.Windows.Compatible.xml | 30 + ...eNameTest.unsigned char.Windows.Default.cs | 29 + ...NameTest.unsigned char.Windows.Default.xml | 30 + ...peNameTest.unsigned char.Windows.Latest.cs | 29 + ...eNameTest.unsigned char.Windows.Latest.xml | 30 + ...eNameTest.unsigned char.Windows.Preview.cs | 29 + ...NameTest.unsigned char.Windows.Preview.xml | 30 + ...peNameTest.unsigned int.Unix.Compatible.cs | 29 + ...eNameTest.unsigned int.Unix.Compatible.xml | 30 + ...eTypeNameTest.unsigned int.Unix.Default.cs | 29 + ...TypeNameTest.unsigned int.Unix.Default.xml | 30 + ...veTypeNameTest.unsigned int.Unix.Latest.cs | 29 + ...eTypeNameTest.unsigned int.Unix.Latest.xml | 30 + ...eTypeNameTest.unsigned int.Unix.Preview.cs | 29 + ...TypeNameTest.unsigned int.Unix.Preview.xml | 30 + ...ameTest.unsigned int.Windows.Compatible.cs | 29 + ...meTest.unsigned int.Windows.Compatible.xml | 30 + ...peNameTest.unsigned int.Windows.Default.cs | 29 + ...eNameTest.unsigned int.Windows.Default.xml | 30 + ...ypeNameTest.unsigned int.Windows.Latest.cs | 29 + ...peNameTest.unsigned int.Windows.Latest.xml | 30 + ...peNameTest.unsigned int.Windows.Preview.cs | 29 + ...eNameTest.unsigned int.Windows.Preview.xml | 30 + ...Test.unsigned long long.Unix.Compatible.cs | 29 + ...est.unsigned long long.Unix.Compatible.xml | 30 + ...ameTest.unsigned long long.Unix.Default.cs | 29 + ...meTest.unsigned long long.Unix.Default.xml | 30 + ...NameTest.unsigned long long.Unix.Latest.cs | 29 + ...ameTest.unsigned long long.Unix.Latest.xml | 30 + ...ameTest.unsigned long long.Unix.Preview.cs | 29 + ...meTest.unsigned long long.Unix.Preview.xml | 30 + ...t.unsigned long long.Windows.Compatible.cs | 29 + ....unsigned long long.Windows.Compatible.xml | 30 + ...Test.unsigned long long.Windows.Default.cs | 29 + ...est.unsigned long long.Windows.Default.xml | 30 + ...eTest.unsigned long long.Windows.Latest.cs | 29 + ...Test.unsigned long long.Windows.Latest.xml | 30 + ...Test.unsigned long long.Windows.Preview.cs | 29 + ...est.unsigned long long.Windows.Preview.xml | 30 + ...NameTest.unsigned short.Unix.Compatible.cs | 29 + ...ameTest.unsigned short.Unix.Compatible.xml | 30 + ...ypeNameTest.unsigned short.Unix.Default.cs | 29 + ...peNameTest.unsigned short.Unix.Default.xml | 30 + ...TypeNameTest.unsigned short.Unix.Latest.cs | 29 + ...ypeNameTest.unsigned short.Unix.Latest.xml | 30 + ...ypeNameTest.unsigned short.Unix.Preview.cs | 29 + ...peNameTest.unsigned short.Unix.Preview.xml | 30 + ...eTest.unsigned short.Windows.Compatible.cs | 29 + ...Test.unsigned short.Windows.Compatible.xml | 30 + ...NameTest.unsigned short.Windows.Default.cs | 29 + ...ameTest.unsigned short.Windows.Default.xml | 30 + ...eNameTest.unsigned short.Windows.Latest.cs | 29 + ...NameTest.unsigned short.Windows.Latest.xml | 30 + ...NameTest.unsigned short.Windows.Preview.cs | 29 + ...ameTest.unsigned short.Windows.Preview.xml | 30 + ...tionTest.NewKeywordTest.Unix.Compatible.cs | 19 + ...ionTest.NewKeywordTest.Unix.Compatible.xml | 28 + ...arationTest.NewKeywordTest.Unix.Default.cs | 19 + ...rationTest.NewKeywordTest.Unix.Default.xml | 28 + ...larationTest.NewKeywordTest.Unix.Latest.cs | 19 + ...arationTest.NewKeywordTest.Unix.Latest.xml | 28 + ...arationTest.NewKeywordTest.Unix.Preview.cs | 19 + ...rationTest.NewKeywordTest.Unix.Preview.xml | 28 + ...nTest.NewKeywordTest.Windows.Compatible.cs | 19 + ...Test.NewKeywordTest.Windows.Compatible.xml | 28 + ...tionTest.NewKeywordTest.Windows.Default.cs | 19 + ...ionTest.NewKeywordTest.Windows.Default.xml | 28 + ...ationTest.NewKeywordTest.Windows.Latest.cs | 19 + ...tionTest.NewKeywordTest.Windows.Latest.xml | 28 + ...tionTest.NewKeywordTest.Windows.Preview.cs | 19 + ...ionTest.NewKeywordTest.Windows.Preview.xml | 28 + ...onTest.NoDefinitionTest.Unix.Compatible.cs | 6 + ...nTest.NoDefinitionTest.Unix.Compatible.xml | 6 + ...ationTest.NoDefinitionTest.Unix.Default.cs | 6 + ...tionTest.NoDefinitionTest.Unix.Default.xml | 6 + ...rationTest.NoDefinitionTest.Unix.Latest.cs | 6 + ...ationTest.NoDefinitionTest.Unix.Latest.xml | 6 + ...ationTest.NoDefinitionTest.Unix.Preview.cs | 6 + ...tionTest.NoDefinitionTest.Unix.Preview.xml | 6 + ...est.NoDefinitionTest.Windows.Compatible.cs | 6 + ...st.NoDefinitionTest.Windows.Compatible.xml | 6 + ...onTest.NoDefinitionTest.Windows.Default.cs | 6 + ...nTest.NoDefinitionTest.Windows.Default.xml | 6 + ...ionTest.NoDefinitionTest.Windows.Latest.cs | 6 + ...onTest.NoDefinitionTest.Windows.Latest.xml | 6 + ...onTest.NoDefinitionTest.Windows.Preview.cs | 6 + ...nTest.NoDefinitionTest.Windows.Preview.xml | 6 + ...eclarationTest.PackTest.Unix.Compatible.cs | 27 + ...clarationTest.PackTest.Unix.Compatible.xml | 27 + ...ctDeclarationTest.PackTest.Unix.Default.cs | 27 + ...tDeclarationTest.PackTest.Unix.Default.xml | 27 + ...uctDeclarationTest.PackTest.Unix.Latest.cs | 27 + ...ctDeclarationTest.PackTest.Unix.Latest.xml | 27 + ...ctDeclarationTest.PackTest.Unix.Preview.cs | 27 + ...tDeclarationTest.PackTest.Unix.Preview.xml | 27 + ...arationTest.PackTest.Windows.Compatible.cs | 27 + ...rationTest.PackTest.Windows.Compatible.xml | 27 + ...eclarationTest.PackTest.Windows.Default.cs | 27 + ...clarationTest.PackTest.Windows.Default.xml | 27 + ...DeclarationTest.PackTest.Windows.Latest.cs | 27 + ...eclarationTest.PackTest.Windows.Latest.xml | 27 + ...eclarationTest.PackTest.Windows.Preview.cs | 27 + ...clarationTest.PackTest.Windows.Preview.xml | 27 + ...nTest.PointerToSelfTest.Unix.Compatible.cs | 9 + ...Test.PointerToSelfTest.Unix.Compatible.xml | 13 + ...tionTest.PointerToSelfTest.Unix.Default.cs | 9 + ...ionTest.PointerToSelfTest.Unix.Default.xml | 13 + ...ationTest.PointerToSelfTest.Unix.Latest.cs | 9 + ...tionTest.PointerToSelfTest.Unix.Latest.xml | 13 + ...tionTest.PointerToSelfTest.Unix.Preview.cs | 9 + ...ionTest.PointerToSelfTest.Unix.Preview.xml | 13 + ...st.PointerToSelfTest.Windows.Compatible.cs | 9 + ...t.PointerToSelfTest.Windows.Compatible.xml | 13 + ...nTest.PointerToSelfTest.Windows.Default.cs | 9 + ...Test.PointerToSelfTest.Windows.Default.xml | 13 + ...onTest.PointerToSelfTest.Windows.Latest.cs | 9 + ...nTest.PointerToSelfTest.Windows.Latest.xml | 13 + ...nTest.PointerToSelfTest.Windows.Preview.cs | 9 + ...Test.PointerToSelfTest.Windows.Preview.xml | 13 + ...terToSelfViaTypedefTest.Unix.Compatible.cs | 10 + ...erToSelfViaTypedefTest.Unix.Compatible.xml | 13 + ...ointerToSelfViaTypedefTest.Unix.Default.cs | 10 + ...interToSelfViaTypedefTest.Unix.Default.xml | 13 + ...PointerToSelfViaTypedefTest.Unix.Latest.cs | 10 + ...ointerToSelfViaTypedefTest.Unix.Latest.xml | 13 + ...ointerToSelfViaTypedefTest.Unix.Preview.cs | 10 + ...interToSelfViaTypedefTest.Unix.Preview.xml | 13 + ...ToSelfViaTypedefTest.Windows.Compatible.cs | 10 + ...oSelfViaTypedefTest.Windows.Compatible.xml | 13 + ...terToSelfViaTypedefTest.Windows.Default.cs | 10 + ...erToSelfViaTypedefTest.Windows.Default.xml | 13 + ...nterToSelfViaTypedefTest.Windows.Latest.cs | 10 + ...terToSelfViaTypedefTest.Windows.Latest.xml | 13 + ...terToSelfViaTypedefTest.Windows.Preview.cs | 10 + ...erToSelfViaTypedefTest.Windows.Preview.xml | 13 + ...emapNestedAnonymousTest.Unix.Compatible.cs | 30 + ...mapNestedAnonymousTest.Unix.Compatible.xml | 33 + ...t.RemapNestedAnonymousTest.Unix.Default.cs | 29 + ....RemapNestedAnonymousTest.Unix.Default.xml | 30 + ...st.RemapNestedAnonymousTest.Unix.Latest.cs | 30 + ...t.RemapNestedAnonymousTest.Unix.Latest.xml | 30 + ...t.RemapNestedAnonymousTest.Unix.Preview.cs | 30 + ....RemapNestedAnonymousTest.Unix.Preview.xml | 30 + ...pNestedAnonymousTest.Windows.Compatible.cs | 30 + ...NestedAnonymousTest.Windows.Compatible.xml | 33 + ...emapNestedAnonymousTest.Windows.Default.cs | 29 + ...mapNestedAnonymousTest.Windows.Default.xml | 30 + ...RemapNestedAnonymousTest.Windows.Latest.cs | 30 + ...emapNestedAnonymousTest.Windows.Latest.xml | 30 + ...emapNestedAnonymousTest.Windows.Preview.cs | 30 + ...mapNestedAnonymousTest.Windows.Preview.xml | 30 + ...clarationTest.RemapTest.Unix.Compatible.cs | 6 + ...larationTest.RemapTest.Unix.Compatible.xml | 6 + ...tDeclarationTest.RemapTest.Unix.Default.cs | 6 + ...DeclarationTest.RemapTest.Unix.Default.xml | 6 + ...ctDeclarationTest.RemapTest.Unix.Latest.cs | 6 + ...tDeclarationTest.RemapTest.Unix.Latest.xml | 6 + ...tDeclarationTest.RemapTest.Unix.Preview.cs | 6 + ...DeclarationTest.RemapTest.Unix.Preview.xml | 6 + ...rationTest.RemapTest.Windows.Compatible.cs | 6 + ...ationTest.RemapTest.Windows.Compatible.xml | 6 + ...clarationTest.RemapTest.Windows.Default.cs | 6 + ...larationTest.RemapTest.Windows.Default.xml | 6 + ...eclarationTest.RemapTest.Windows.Latest.cs | 6 + ...clarationTest.RemapTest.Windows.Latest.xml | 6 + ...clarationTest.RemapTest.Windows.Preview.cs | 6 + ...larationTest.RemapTest.Windows.Preview.xml | 6 + ...onDefinitionPointerTest.Unix.Compatible.cs | 6 + ...nDefinitionPointerTest.Unix.Compatible.xml | 6 + ...ipNonDefinitionPointerTest.Unix.Default.cs | 6 + ...pNonDefinitionPointerTest.Unix.Default.xml | 6 + ...kipNonDefinitionPointerTest.Unix.Latest.cs | 6 + ...ipNonDefinitionPointerTest.Unix.Latest.xml | 6 + ...ipNonDefinitionPointerTest.Unix.Preview.cs | 6 + ...pNonDefinitionPointerTest.Unix.Preview.xml | 6 + ...efinitionPointerTest.Windows.Compatible.cs | 6 + ...finitionPointerTest.Windows.Compatible.xml | 6 + ...onDefinitionPointerTest.Windows.Default.cs | 6 + ...nDefinitionPointerTest.Windows.Default.xml | 6 + ...NonDefinitionPointerTest.Windows.Latest.cs | 6 + ...onDefinitionPointerTest.Windows.Latest.xml | 6 + ...onDefinitionPointerTest.Windows.Preview.cs | 6 + ...nDefinitionPointerTest.Windows.Preview.xml | 6 + ...onDefinitionTest.double.Unix.Compatible.cs | 11 + ...nDefinitionTest.double.Unix.Compatible.xml | 16 + ...ipNonDefinitionTest.double.Unix.Default.cs | 11 + ...pNonDefinitionTest.double.Unix.Default.xml | 16 + ...kipNonDefinitionTest.double.Unix.Latest.cs | 11 + ...ipNonDefinitionTest.double.Unix.Latest.xml | 16 + ...ipNonDefinitionTest.double.Unix.Preview.cs | 11 + ...pNonDefinitionTest.double.Unix.Preview.xml | 16 + ...efinitionTest.double.Windows.Compatible.cs | 11 + ...finitionTest.double.Windows.Compatible.xml | 16 + ...onDefinitionTest.double.Windows.Default.cs | 11 + ...nDefinitionTest.double.Windows.Default.xml | 16 + ...NonDefinitionTest.double.Windows.Latest.cs | 11 + ...onDefinitionTest.double.Windows.Latest.xml | 16 + ...onDefinitionTest.double.Windows.Preview.cs | 11 + ...nDefinitionTest.double.Windows.Preview.xml | 16 + ...NonDefinitionTest.float.Unix.Compatible.cs | 11 + ...onDefinitionTest.float.Unix.Compatible.xml | 16 + ...kipNonDefinitionTest.float.Unix.Default.cs | 11 + ...ipNonDefinitionTest.float.Unix.Default.xml | 16 + ...SkipNonDefinitionTest.float.Unix.Latest.cs | 11 + ...kipNonDefinitionTest.float.Unix.Latest.xml | 16 + ...kipNonDefinitionTest.float.Unix.Preview.cs | 11 + ...ipNonDefinitionTest.float.Unix.Preview.xml | 16 + ...DefinitionTest.float.Windows.Compatible.cs | 11 + ...efinitionTest.float.Windows.Compatible.xml | 16 + ...NonDefinitionTest.float.Windows.Default.cs | 11 + ...onDefinitionTest.float.Windows.Default.xml | 16 + ...pNonDefinitionTest.float.Windows.Latest.cs | 11 + ...NonDefinitionTest.float.Windows.Latest.xml | 16 + ...NonDefinitionTest.float.Windows.Preview.cs | 11 + ...onDefinitionTest.float.Windows.Preview.xml | 16 + ...ipNonDefinitionTest.int.Unix.Compatible.cs | 11 + ...pNonDefinitionTest.int.Unix.Compatible.xml | 16 + ....SkipNonDefinitionTest.int.Unix.Default.cs | 11 + ...SkipNonDefinitionTest.int.Unix.Default.xml | 16 + ...t.SkipNonDefinitionTest.int.Unix.Latest.cs | 11 + ....SkipNonDefinitionTest.int.Unix.Latest.xml | 16 + ....SkipNonDefinitionTest.int.Unix.Preview.cs | 11 + ...SkipNonDefinitionTest.int.Unix.Preview.xml | 16 + ...onDefinitionTest.int.Windows.Compatible.cs | 11 + ...nDefinitionTest.int.Windows.Compatible.xml | 16 + ...ipNonDefinitionTest.int.Windows.Default.cs | 11 + ...pNonDefinitionTest.int.Windows.Default.xml | 16 + ...kipNonDefinitionTest.int.Windows.Latest.cs | 11 + ...ipNonDefinitionTest.int.Windows.Latest.xml | 16 + ...ipNonDefinitionTest.int.Windows.Preview.cs | 11 + ...pNonDefinitionTest.int.Windows.Preview.xml | 16 + ...NonDefinitionTest.short.Unix.Compatible.cs | 11 + ...onDefinitionTest.short.Unix.Compatible.xml | 16 + ...kipNonDefinitionTest.short.Unix.Default.cs | 11 + ...ipNonDefinitionTest.short.Unix.Default.xml | 16 + ...SkipNonDefinitionTest.short.Unix.Latest.cs | 11 + ...kipNonDefinitionTest.short.Unix.Latest.xml | 16 + ...kipNonDefinitionTest.short.Unix.Preview.cs | 11 + ...ipNonDefinitionTest.short.Unix.Preview.xml | 16 + ...DefinitionTest.short.Windows.Compatible.cs | 11 + ...efinitionTest.short.Windows.Compatible.xml | 16 + ...NonDefinitionTest.short.Windows.Default.cs | 11 + ...onDefinitionTest.short.Windows.Default.xml | 16 + ...pNonDefinitionTest.short.Windows.Latest.cs | 11 + ...NonDefinitionTest.short.Windows.Latest.xml | 16 + ...NonDefinitionTest.short.Windows.Preview.cs | 11 + ...onDefinitionTest.short.Windows.Preview.xml | 16 + ...NativeTypeNameTest.bool.Unix.Compatible.cs | 14 + ...ativeTypeNameTest.bool.Unix.Compatible.xml | 16 + ...ithNativeTypeNameTest.bool.Unix.Default.cs | 14 + ...thNativeTypeNameTest.bool.Unix.Default.xml | 16 + ...WithNativeTypeNameTest.bool.Unix.Latest.cs | 14 + ...ithNativeTypeNameTest.bool.Unix.Latest.xml | 16 + ...ithNativeTypeNameTest.bool.Unix.Preview.cs | 14 + ...thNativeTypeNameTest.bool.Unix.Preview.xml | 16 + ...iveTypeNameTest.bool.Windows.Compatible.cs | 14 + ...veTypeNameTest.bool.Windows.Compatible.xml | 16 + ...NativeTypeNameTest.bool.Windows.Default.cs | 14 + ...ativeTypeNameTest.bool.Windows.Default.xml | 16 + ...hNativeTypeNameTest.bool.Windows.Latest.cs | 14 + ...NativeTypeNameTest.bool.Windows.Latest.xml | 16 + ...NativeTypeNameTest.bool.Windows.Preview.cs | 14 + ...ativeTypeNameTest.bool.Windows.Preview.xml | 16 + ...eTypeNameTest.long long.Unix.Compatible.cs | 14 + ...TypeNameTest.long long.Unix.Compatible.xml | 16 + ...tiveTypeNameTest.long long.Unix.Default.cs | 14 + ...iveTypeNameTest.long long.Unix.Default.xml | 16 + ...ativeTypeNameTest.long long.Unix.Latest.cs | 14 + ...tiveTypeNameTest.long long.Unix.Latest.xml | 16 + ...tiveTypeNameTest.long long.Unix.Preview.cs | 14 + ...iveTypeNameTest.long long.Unix.Preview.xml | 16 + ...peNameTest.long long.Windows.Compatible.cs | 14 + ...eNameTest.long long.Windows.Compatible.xml | 16 + ...eTypeNameTest.long long.Windows.Default.cs | 14 + ...TypeNameTest.long long.Windows.Default.xml | 16 + ...veTypeNameTest.long long.Windows.Latest.cs | 14 + ...eTypeNameTest.long long.Windows.Latest.xml | 16 + ...eTypeNameTest.long long.Windows.Preview.cs | 14 + ...TypeNameTest.long long.Windows.Preview.xml | 16 + ...ypeNameTest.signed char.Unix.Compatible.cs | 14 + ...peNameTest.signed char.Unix.Compatible.xml | 16 + ...veTypeNameTest.signed char.Unix.Default.cs | 14 + ...eTypeNameTest.signed char.Unix.Default.xml | 16 + ...iveTypeNameTest.signed char.Unix.Latest.cs | 14 + ...veTypeNameTest.signed char.Unix.Latest.xml | 16 + ...veTypeNameTest.signed char.Unix.Preview.cs | 14 + ...eTypeNameTest.signed char.Unix.Preview.xml | 16 + ...NameTest.signed char.Windows.Compatible.cs | 14 + ...ameTest.signed char.Windows.Compatible.xml | 16 + ...ypeNameTest.signed char.Windows.Default.cs | 14 + ...peNameTest.signed char.Windows.Default.xml | 16 + ...TypeNameTest.signed char.Windows.Latest.cs | 14 + ...ypeNameTest.signed char.Windows.Latest.xml | 16 + ...ypeNameTest.signed char.Windows.Preview.cs | 14 + ...peNameTest.signed char.Windows.Preview.xml | 16 + ...eNameTest.unsigned char.Unix.Compatible.cs | 14 + ...NameTest.unsigned char.Unix.Compatible.xml | 16 + ...TypeNameTest.unsigned char.Unix.Default.cs | 14 + ...ypeNameTest.unsigned char.Unix.Default.xml | 16 + ...eTypeNameTest.unsigned char.Unix.Latest.cs | 14 + ...TypeNameTest.unsigned char.Unix.Latest.xml | 16 + ...TypeNameTest.unsigned char.Unix.Preview.cs | 14 + ...ypeNameTest.unsigned char.Unix.Preview.xml | 16 + ...meTest.unsigned char.Windows.Compatible.cs | 14 + ...eTest.unsigned char.Windows.Compatible.xml | 16 + ...eNameTest.unsigned char.Windows.Default.cs | 14 + ...NameTest.unsigned char.Windows.Default.xml | 16 + ...peNameTest.unsigned char.Windows.Latest.cs | 14 + ...eNameTest.unsigned char.Windows.Latest.xml | 16 + ...eNameTest.unsigned char.Windows.Preview.cs | 14 + ...NameTest.unsigned char.Windows.Preview.xml | 16 + ...peNameTest.unsigned int.Unix.Compatible.cs | 14 + ...eNameTest.unsigned int.Unix.Compatible.xml | 16 + ...eTypeNameTest.unsigned int.Unix.Default.cs | 14 + ...TypeNameTest.unsigned int.Unix.Default.xml | 16 + ...veTypeNameTest.unsigned int.Unix.Latest.cs | 14 + ...eTypeNameTest.unsigned int.Unix.Latest.xml | 16 + ...eTypeNameTest.unsigned int.Unix.Preview.cs | 14 + ...TypeNameTest.unsigned int.Unix.Preview.xml | 16 + ...ameTest.unsigned int.Windows.Compatible.cs | 14 + ...meTest.unsigned int.Windows.Compatible.xml | 16 + ...peNameTest.unsigned int.Windows.Default.cs | 14 + ...eNameTest.unsigned int.Windows.Default.xml | 16 + ...ypeNameTest.unsigned int.Windows.Latest.cs | 14 + ...peNameTest.unsigned int.Windows.Latest.xml | 16 + ...peNameTest.unsigned int.Windows.Preview.cs | 14 + ...eNameTest.unsigned int.Windows.Preview.xml | 16 + ...Test.unsigned long long.Unix.Compatible.cs | 14 + ...est.unsigned long long.Unix.Compatible.xml | 16 + ...ameTest.unsigned long long.Unix.Default.cs | 14 + ...meTest.unsigned long long.Unix.Default.xml | 16 + ...NameTest.unsigned long long.Unix.Latest.cs | 14 + ...ameTest.unsigned long long.Unix.Latest.xml | 16 + ...ameTest.unsigned long long.Unix.Preview.cs | 14 + ...meTest.unsigned long long.Unix.Preview.xml | 16 + ...t.unsigned long long.Windows.Compatible.cs | 14 + ....unsigned long long.Windows.Compatible.xml | 16 + ...Test.unsigned long long.Windows.Default.cs | 14 + ...est.unsigned long long.Windows.Default.xml | 16 + ...eTest.unsigned long long.Windows.Latest.cs | 14 + ...Test.unsigned long long.Windows.Latest.xml | 16 + ...Test.unsigned long long.Windows.Preview.cs | 14 + ...est.unsigned long long.Windows.Preview.xml | 16 + ...NameTest.unsigned short.Unix.Compatible.cs | 14 + ...ameTest.unsigned short.Unix.Compatible.xml | 16 + ...ypeNameTest.unsigned short.Unix.Default.cs | 14 + ...peNameTest.unsigned short.Unix.Default.xml | 16 + ...TypeNameTest.unsigned short.Unix.Latest.cs | 14 + ...ypeNameTest.unsigned short.Unix.Latest.xml | 16 + ...ypeNameTest.unsigned short.Unix.Preview.cs | 14 + ...peNameTest.unsigned short.Unix.Preview.xml | 16 + ...eTest.unsigned short.Windows.Compatible.cs | 14 + ...Test.unsigned short.Windows.Compatible.xml | 16 + ...NameTest.unsigned short.Windows.Default.cs | 14 + ...ameTest.unsigned short.Windows.Default.xml | 16 + ...eNameTest.unsigned short.Windows.Latest.cs | 14 + ...NameTest.unsigned short.Windows.Latest.xml | 16 + ...NameTest.unsigned short.Windows.Preview.cs | 14 + ...ameTest.unsigned short.Windows.Preview.xml | 16 + ...ceLocationAttributeTest.Unix.Compatible.cs | 15 + ...eLocationAttributeTest.Unix.Compatible.xml | 16 + ...ourceLocationAttributeTest.Unix.Default.cs | 15 + ...urceLocationAttributeTest.Unix.Default.xml | 16 + ...SourceLocationAttributeTest.Unix.Latest.cs | 15 + ...ourceLocationAttributeTest.Unix.Latest.xml | 16 + ...ourceLocationAttributeTest.Unix.Preview.cs | 15 + ...urceLocationAttributeTest.Unix.Preview.xml | 16 + ...ocationAttributeTest.Windows.Compatible.cs | 15 + ...cationAttributeTest.Windows.Compatible.xml | 16 + ...ceLocationAttributeTest.Windows.Default.cs | 15 + ...eLocationAttributeTest.Windows.Default.xml | 16 + ...rceLocationAttributeTest.Windows.Latest.cs | 15 + ...ceLocationAttributeTest.Windows.Latest.xml | 16 + ...ceLocationAttributeTest.Windows.Preview.cs | 15 + ...eLocationAttributeTest.Windows.Preview.xml | 16 + ...onTest.TypedefTest.bool.Unix.Compatible.cs | 14 + ...nTest.TypedefTest.bool.Unix.Compatible.xml | 16 + ...ationTest.TypedefTest.bool.Unix.Default.cs | 14 + ...tionTest.TypedefTest.bool.Unix.Default.xml | 16 + ...rationTest.TypedefTest.bool.Unix.Latest.cs | 14 + ...ationTest.TypedefTest.bool.Unix.Latest.xml | 16 + ...ationTest.TypedefTest.bool.Unix.Preview.cs | 14 + ...tionTest.TypedefTest.bool.Unix.Preview.xml | 16 + ...est.TypedefTest.bool.Windows.Compatible.cs | 14 + ...st.TypedefTest.bool.Windows.Compatible.xml | 16 + ...onTest.TypedefTest.bool.Windows.Default.cs | 14 + ...nTest.TypedefTest.bool.Windows.Default.xml | 16 + ...ionTest.TypedefTest.bool.Windows.Latest.cs | 14 + ...onTest.TypedefTest.bool.Windows.Latest.xml | 16 + ...onTest.TypedefTest.bool.Windows.Preview.cs | 14 + ...nTest.TypedefTest.bool.Windows.Preview.xml | 16 + ...Test.TypedefTest.double.Unix.Compatible.cs | 14 + ...est.TypedefTest.double.Unix.Compatible.xml | 16 + ...ionTest.TypedefTest.double.Unix.Default.cs | 14 + ...onTest.TypedefTest.double.Unix.Default.xml | 16 + ...tionTest.TypedefTest.double.Unix.Latest.cs | 14 + ...ionTest.TypedefTest.double.Unix.Latest.xml | 16 + ...ionTest.TypedefTest.double.Unix.Preview.cs | 14 + ...onTest.TypedefTest.double.Unix.Preview.xml | 16 + ...t.TypedefTest.double.Windows.Compatible.cs | 14 + ....TypedefTest.double.Windows.Compatible.xml | 16 + ...Test.TypedefTest.double.Windows.Default.cs | 14 + ...est.TypedefTest.double.Windows.Default.xml | 16 + ...nTest.TypedefTest.double.Windows.Latest.cs | 14 + ...Test.TypedefTest.double.Windows.Latest.xml | 16 + ...Test.TypedefTest.double.Windows.Preview.cs | 14 + ...est.TypedefTest.double.Windows.Preview.xml | 16 + ...nTest.TypedefTest.float.Unix.Compatible.cs | 14 + ...Test.TypedefTest.float.Unix.Compatible.xml | 16 + ...tionTest.TypedefTest.float.Unix.Default.cs | 14 + ...ionTest.TypedefTest.float.Unix.Default.xml | 16 + ...ationTest.TypedefTest.float.Unix.Latest.cs | 14 + ...tionTest.TypedefTest.float.Unix.Latest.xml | 16 + ...tionTest.TypedefTest.float.Unix.Preview.cs | 14 + ...ionTest.TypedefTest.float.Unix.Preview.xml | 16 + ...st.TypedefTest.float.Windows.Compatible.cs | 14 + ...t.TypedefTest.float.Windows.Compatible.xml | 16 + ...nTest.TypedefTest.float.Windows.Default.cs | 14 + ...Test.TypedefTest.float.Windows.Default.xml | 16 + ...onTest.TypedefTest.float.Windows.Latest.cs | 14 + ...nTest.TypedefTest.float.Windows.Latest.xml | 16 + ...nTest.TypedefTest.float.Windows.Preview.cs | 14 + ...Test.TypedefTest.float.Windows.Preview.xml | 16 + ...ionTest.TypedefTest.int.Unix.Compatible.cs | 14 + ...onTest.TypedefTest.int.Unix.Compatible.xml | 16 + ...rationTest.TypedefTest.int.Unix.Default.cs | 14 + ...ationTest.TypedefTest.int.Unix.Default.xml | 16 + ...arationTest.TypedefTest.int.Unix.Latest.cs | 14 + ...rationTest.TypedefTest.int.Unix.Latest.xml | 16 + ...rationTest.TypedefTest.int.Unix.Preview.cs | 14 + ...ationTest.TypedefTest.int.Unix.Preview.xml | 16 + ...Test.TypedefTest.int.Windows.Compatible.cs | 14 + ...est.TypedefTest.int.Windows.Compatible.xml | 16 + ...ionTest.TypedefTest.int.Windows.Default.cs | 14 + ...onTest.TypedefTest.int.Windows.Default.xml | 16 + ...tionTest.TypedefTest.int.Windows.Latest.cs | 14 + ...ionTest.TypedefTest.int.Windows.Latest.xml | 16 + ...ionTest.TypedefTest.int.Windows.Preview.cs | 14 + ...onTest.TypedefTest.int.Windows.Preview.xml | 16 + ...t.TypedefTest.long long.Unix.Compatible.cs | 14 + ....TypedefTest.long long.Unix.Compatible.xml | 16 + ...Test.TypedefTest.long long.Unix.Default.cs | 14 + ...est.TypedefTest.long long.Unix.Default.xml | 16 + ...nTest.TypedefTest.long long.Unix.Latest.cs | 14 + ...Test.TypedefTest.long long.Unix.Latest.xml | 16 + ...Test.TypedefTest.long long.Unix.Preview.cs | 14 + ...est.TypedefTest.long long.Unix.Preview.xml | 16 + ...ypedefTest.long long.Windows.Compatible.cs | 14 + ...pedefTest.long long.Windows.Compatible.xml | 16 + ...t.TypedefTest.long long.Windows.Default.cs | 14 + ....TypedefTest.long long.Windows.Default.xml | 16 + ...st.TypedefTest.long long.Windows.Latest.cs | 14 + ...t.TypedefTest.long long.Windows.Latest.xml | 16 + ...t.TypedefTest.long long.Windows.Preview.cs | 14 + ....TypedefTest.long long.Windows.Preview.xml | 16 + ...nTest.TypedefTest.short.Unix.Compatible.cs | 14 + ...Test.TypedefTest.short.Unix.Compatible.xml | 16 + ...tionTest.TypedefTest.short.Unix.Default.cs | 14 + ...ionTest.TypedefTest.short.Unix.Default.xml | 16 + ...ationTest.TypedefTest.short.Unix.Latest.cs | 14 + ...tionTest.TypedefTest.short.Unix.Latest.xml | 16 + ...tionTest.TypedefTest.short.Unix.Preview.cs | 14 + ...ionTest.TypedefTest.short.Unix.Preview.xml | 16 + ...st.TypedefTest.short.Windows.Compatible.cs | 14 + ...t.TypedefTest.short.Windows.Compatible.xml | 16 + ...nTest.TypedefTest.short.Windows.Default.cs | 14 + ...Test.TypedefTest.short.Windows.Default.xml | 16 + ...onTest.TypedefTest.short.Windows.Latest.cs | 14 + ...nTest.TypedefTest.short.Windows.Latest.xml | 16 + ...nTest.TypedefTest.short.Windows.Preview.cs | 14 + ...Test.TypedefTest.short.Windows.Preview.xml | 16 + ...TypedefTest.signed char.Unix.Compatible.cs | 14 + ...ypedefTest.signed char.Unix.Compatible.xml | 16 + ...st.TypedefTest.signed char.Unix.Default.cs | 14 + ...t.TypedefTest.signed char.Unix.Default.xml | 16 + ...est.TypedefTest.signed char.Unix.Latest.cs | 14 + ...st.TypedefTest.signed char.Unix.Latest.xml | 16 + ...st.TypedefTest.signed char.Unix.Preview.cs | 14 + ...t.TypedefTest.signed char.Unix.Preview.xml | 16 + ...edefTest.signed char.Windows.Compatible.cs | 14 + ...defTest.signed char.Windows.Compatible.xml | 16 + ...TypedefTest.signed char.Windows.Default.cs | 14 + ...ypedefTest.signed char.Windows.Default.xml | 16 + ....TypedefTest.signed char.Windows.Latest.cs | 14 + ...TypedefTest.signed char.Windows.Latest.xml | 16 + ...TypedefTest.signed char.Windows.Preview.cs | 14 + ...ypedefTest.signed char.Windows.Preview.xml | 16 + ...pedefTest.unsigned char.Unix.Compatible.cs | 14 + ...edefTest.unsigned char.Unix.Compatible.xml | 16 + ....TypedefTest.unsigned char.Unix.Default.cs | 14 + ...TypedefTest.unsigned char.Unix.Default.xml | 16 + ...t.TypedefTest.unsigned char.Unix.Latest.cs | 14 + ....TypedefTest.unsigned char.Unix.Latest.xml | 16 + ....TypedefTest.unsigned char.Unix.Preview.cs | 14 + ...TypedefTest.unsigned char.Unix.Preview.xml | 16 + ...efTest.unsigned char.Windows.Compatible.cs | 14 + ...fTest.unsigned char.Windows.Compatible.xml | 16 + ...pedefTest.unsigned char.Windows.Default.cs | 14 + ...edefTest.unsigned char.Windows.Default.xml | 16 + ...ypedefTest.unsigned char.Windows.Latest.cs | 14 + ...pedefTest.unsigned char.Windows.Latest.xml | 16 + ...pedefTest.unsigned char.Windows.Preview.cs | 14 + ...edefTest.unsigned char.Windows.Preview.xml | 16 + ...ypedefTest.unsigned int.Unix.Compatible.cs | 14 + ...pedefTest.unsigned int.Unix.Compatible.xml | 16 + ...t.TypedefTest.unsigned int.Unix.Default.cs | 14 + ....TypedefTest.unsigned int.Unix.Default.xml | 16 + ...st.TypedefTest.unsigned int.Unix.Latest.cs | 14 + ...t.TypedefTest.unsigned int.Unix.Latest.xml | 16 + ...t.TypedefTest.unsigned int.Unix.Preview.cs | 14 + ....TypedefTest.unsigned int.Unix.Preview.xml | 16 + ...defTest.unsigned int.Windows.Compatible.cs | 14 + ...efTest.unsigned int.Windows.Compatible.xml | 16 + ...ypedefTest.unsigned int.Windows.Default.cs | 14 + ...pedefTest.unsigned int.Windows.Default.xml | 16 + ...TypedefTest.unsigned int.Windows.Latest.cs | 14 + ...ypedefTest.unsigned int.Windows.Latest.xml | 16 + ...ypedefTest.unsigned int.Windows.Preview.cs | 14 + ...pedefTest.unsigned int.Windows.Preview.xml | 16 + ...Test.unsigned long long.Unix.Compatible.cs | 14 + ...est.unsigned long long.Unix.Compatible.xml | 16 + ...defTest.unsigned long long.Unix.Default.cs | 14 + ...efTest.unsigned long long.Unix.Default.xml | 16 + ...edefTest.unsigned long long.Unix.Latest.cs | 14 + ...defTest.unsigned long long.Unix.Latest.xml | 16 + ...defTest.unsigned long long.Unix.Preview.cs | 14 + ...efTest.unsigned long long.Unix.Preview.xml | 16 + ...t.unsigned long long.Windows.Compatible.cs | 14 + ....unsigned long long.Windows.Compatible.xml | 16 + ...Test.unsigned long long.Windows.Default.cs | 14 + ...est.unsigned long long.Windows.Default.xml | 16 + ...fTest.unsigned long long.Windows.Latest.cs | 14 + ...Test.unsigned long long.Windows.Latest.xml | 16 + ...Test.unsigned long long.Windows.Preview.cs | 14 + ...est.unsigned long long.Windows.Preview.xml | 16 + ...edefTest.unsigned short.Unix.Compatible.cs | 14 + ...defTest.unsigned short.Unix.Compatible.xml | 16 + ...TypedefTest.unsigned short.Unix.Default.cs | 14 + ...ypedefTest.unsigned short.Unix.Default.xml | 16 + ....TypedefTest.unsigned short.Unix.Latest.cs | 14 + ...TypedefTest.unsigned short.Unix.Latest.xml | 16 + ...TypedefTest.unsigned short.Unix.Preview.cs | 14 + ...ypedefTest.unsigned short.Unix.Preview.xml | 16 + ...fTest.unsigned short.Windows.Compatible.cs | 14 + ...Test.unsigned short.Windows.Compatible.xml | 16 + ...edefTest.unsigned short.Windows.Default.cs | 14 + ...defTest.unsigned short.Windows.Default.xml | 16 + ...pedefTest.unsigned short.Windows.Latest.cs | 14 + ...edefTest.unsigned short.Windows.Latest.xml | 16 + ...edefTest.unsigned short.Windows.Preview.cs | 14 + ...defTest.unsigned short.Windows.Preview.xml | 16 + ...st.UsingDeclarationTest.Unix.Compatible.cs | 17 + ...t.UsingDeclarationTest.Unix.Compatible.xml | 17 + ...nTest.UsingDeclarationTest.Unix.Default.cs | 17 + ...Test.UsingDeclarationTest.Unix.Default.xml | 17 + ...onTest.UsingDeclarationTest.Unix.Latest.cs | 17 + ...nTest.UsingDeclarationTest.Unix.Latest.xml | 17 + ...nTest.UsingDeclarationTest.Unix.Preview.cs | 17 + ...Test.UsingDeclarationTest.Unix.Preview.xml | 17 + ...UsingDeclarationTest.Windows.Compatible.cs | 17 + ...singDeclarationTest.Windows.Compatible.xml | 17 + ...st.UsingDeclarationTest.Windows.Default.cs | 17 + ...t.UsingDeclarationTest.Windows.Default.xml | 17 + ...est.UsingDeclarationTest.Windows.Latest.cs | 17 + ...st.UsingDeclarationTest.Windows.Latest.xml | 17 + ...st.UsingDeclarationTest.Windows.Preview.cs | 17 + ...t.UsingDeclarationTest.Windows.Preview.xml | 17 + ...WithAccessSpecifierTest.Unix.Compatible.cs | 23 + ...ithAccessSpecifierTest.Unix.Compatible.xml | 29 + ...st.WithAccessSpecifierTest.Unix.Default.cs | 23 + ...t.WithAccessSpecifierTest.Unix.Default.xml | 29 + ...est.WithAccessSpecifierTest.Unix.Latest.cs | 23 + ...st.WithAccessSpecifierTest.Unix.Latest.xml | 29 + ...st.WithAccessSpecifierTest.Unix.Preview.cs | 23 + ...t.WithAccessSpecifierTest.Unix.Preview.xml | 29 + ...hAccessSpecifierTest.Windows.Compatible.cs | 23 + ...AccessSpecifierTest.Windows.Compatible.xml | 29 + ...WithAccessSpecifierTest.Windows.Default.cs | 23 + ...ithAccessSpecifierTest.Windows.Default.xml | 29 + ....WithAccessSpecifierTest.Windows.Latest.cs | 23 + ...WithAccessSpecifierTest.Windows.Latest.xml | 29 + ...WithAccessSpecifierTest.Windows.Preview.cs | 23 + ...ithAccessSpecifierTest.Windows.Preview.xml | 29 + ...ionTest.WithPackingTest.Unix.Compatible.cs | 29 + ...onTest.WithPackingTest.Unix.Compatible.xml | 30 + ...rationTest.WithPackingTest.Unix.Default.cs | 28 + ...ationTest.WithPackingTest.Unix.Default.xml | 31 + ...arationTest.WithPackingTest.Unix.Latest.cs | 18 + ...rationTest.WithPackingTest.Unix.Latest.xml | 16 + ...rationTest.WithPackingTest.Unix.Preview.cs | 18 + ...ationTest.WithPackingTest.Unix.Preview.xml | 16 + ...Test.WithPackingTest.Windows.Compatible.cs | 29 + ...est.WithPackingTest.Windows.Compatible.xml | 30 + ...ionTest.WithPackingTest.Windows.Default.cs | 28 + ...onTest.WithPackingTest.Windows.Default.xml | 31 + ...tionTest.WithPackingTest.Windows.Latest.cs | 18 + ...ionTest.WithPackingTest.Windows.Latest.xml | 16 + ...ionTest.WithPackingTest.Windows.Preview.cs | 18 + ...onTest.WithPackingTest.Windows.Preview.xml | 16 + ...onTest.BasicTest.double.Unix.Compatible.cs | 17 + ...nTest.BasicTest.double.Unix.Compatible.xml | 16 + ...ationTest.BasicTest.double.Unix.Default.cs | 17 + ...tionTest.BasicTest.double.Unix.Default.xml | 16 + ...rationTest.BasicTest.double.Unix.Latest.cs | 17 + ...ationTest.BasicTest.double.Unix.Latest.xml | 16 + ...ationTest.BasicTest.double.Unix.Preview.cs | 17 + ...tionTest.BasicTest.double.Unix.Preview.xml | 16 + ...est.BasicTest.double.Windows.Compatible.cs | 17 + ...st.BasicTest.double.Windows.Compatible.xml | 16 + ...onTest.BasicTest.double.Windows.Default.cs | 17 + ...nTest.BasicTest.double.Windows.Default.xml | 16 + ...ionTest.BasicTest.double.Windows.Latest.cs | 17 + ...onTest.BasicTest.double.Windows.Latest.xml | 16 + ...onTest.BasicTest.double.Windows.Preview.cs | 17 + ...nTest.BasicTest.double.Windows.Preview.xml | 16 + ...ionTest.BasicTest.float.Unix.Compatible.cs | 17 + ...onTest.BasicTest.float.Unix.Compatible.xml | 16 + ...rationTest.BasicTest.float.Unix.Default.cs | 17 + ...ationTest.BasicTest.float.Unix.Default.xml | 16 + ...arationTest.BasicTest.float.Unix.Latest.cs | 17 + ...rationTest.BasicTest.float.Unix.Latest.xml | 16 + ...rationTest.BasicTest.float.Unix.Preview.cs | 17 + ...ationTest.BasicTest.float.Unix.Preview.xml | 16 + ...Test.BasicTest.float.Windows.Compatible.cs | 17 + ...est.BasicTest.float.Windows.Compatible.xml | 16 + ...ionTest.BasicTest.float.Windows.Default.cs | 17 + ...onTest.BasicTest.float.Windows.Default.xml | 16 + ...tionTest.BasicTest.float.Windows.Latest.cs | 17 + ...ionTest.BasicTest.float.Windows.Latest.xml | 16 + ...ionTest.BasicTest.float.Windows.Preview.cs | 17 + ...onTest.BasicTest.float.Windows.Preview.xml | 16 + ...ationTest.BasicTest.int.Unix.Compatible.cs | 17 + ...tionTest.BasicTest.int.Unix.Compatible.xml | 16 + ...larationTest.BasicTest.int.Unix.Default.cs | 17 + ...arationTest.BasicTest.int.Unix.Default.xml | 16 + ...clarationTest.BasicTest.int.Unix.Latest.cs | 17 + ...larationTest.BasicTest.int.Unix.Latest.xml | 16 + ...larationTest.BasicTest.int.Unix.Preview.cs | 17 + ...arationTest.BasicTest.int.Unix.Preview.xml | 16 + ...onTest.BasicTest.int.Windows.Compatible.cs | 17 + ...nTest.BasicTest.int.Windows.Compatible.xml | 16 + ...ationTest.BasicTest.int.Windows.Default.cs | 17 + ...tionTest.BasicTest.int.Windows.Default.xml | 16 + ...rationTest.BasicTest.int.Windows.Latest.cs | 17 + ...ationTest.BasicTest.int.Windows.Latest.xml | 16 + ...ationTest.BasicTest.int.Windows.Preview.cs | 17 + ...tionTest.BasicTest.int.Windows.Preview.xml | 16 + ...ionTest.BasicTest.short.Unix.Compatible.cs | 17 + ...onTest.BasicTest.short.Unix.Compatible.xml | 16 + ...rationTest.BasicTest.short.Unix.Default.cs | 17 + ...ationTest.BasicTest.short.Unix.Default.xml | 16 + ...arationTest.BasicTest.short.Unix.Latest.cs | 17 + ...rationTest.BasicTest.short.Unix.Latest.xml | 16 + ...rationTest.BasicTest.short.Unix.Preview.cs | 17 + ...ationTest.BasicTest.short.Unix.Preview.xml | 16 + ...Test.BasicTest.short.Windows.Compatible.cs | 17 + ...est.BasicTest.short.Windows.Compatible.xml | 16 + ...ionTest.BasicTest.short.Windows.Default.cs | 17 + ...onTest.BasicTest.short.Windows.Default.xml | 16 + ...tionTest.BasicTest.short.Windows.Latest.cs | 17 + ...ionTest.BasicTest.short.Windows.Latest.xml | 16 + ...ionTest.BasicTest.short.Windows.Preview.cs | 17 + ...onTest.BasicTest.short.Windows.Preview.xml | 16 + ...BasicTestInCMode.double.Unix.Compatible.cs | 17 + ...asicTestInCMode.double.Unix.Compatible.xml | 16 + ...st.BasicTestInCMode.double.Unix.Default.cs | 17 + ...t.BasicTestInCMode.double.Unix.Default.xml | 16 + ...est.BasicTestInCMode.double.Unix.Latest.cs | 17 + ...st.BasicTestInCMode.double.Unix.Latest.xml | 16 + ...st.BasicTestInCMode.double.Unix.Preview.cs | 17 + ...t.BasicTestInCMode.double.Unix.Preview.xml | 16 + ...icTestInCMode.double.Windows.Compatible.cs | 17 + ...cTestInCMode.double.Windows.Compatible.xml | 16 + ...BasicTestInCMode.double.Windows.Default.cs | 17 + ...asicTestInCMode.double.Windows.Default.xml | 16 + ....BasicTestInCMode.double.Windows.Latest.cs | 17 + ...BasicTestInCMode.double.Windows.Latest.xml | 16 + ...BasicTestInCMode.double.Windows.Preview.cs | 17 + ...asicTestInCMode.double.Windows.Preview.xml | 16 + ....BasicTestInCMode.float.Unix.Compatible.cs | 17 + ...BasicTestInCMode.float.Unix.Compatible.xml | 16 + ...est.BasicTestInCMode.float.Unix.Default.cs | 17 + ...st.BasicTestInCMode.float.Unix.Default.xml | 16 + ...Test.BasicTestInCMode.float.Unix.Latest.cs | 17 + ...est.BasicTestInCMode.float.Unix.Latest.xml | 16 + ...est.BasicTestInCMode.float.Unix.Preview.cs | 17 + ...st.BasicTestInCMode.float.Unix.Preview.xml | 16 + ...sicTestInCMode.float.Windows.Compatible.cs | 17 + ...icTestInCMode.float.Windows.Compatible.xml | 16 + ....BasicTestInCMode.float.Windows.Default.cs | 17 + ...BasicTestInCMode.float.Windows.Default.xml | 16 + ...t.BasicTestInCMode.float.Windows.Latest.cs | 17 + ....BasicTestInCMode.float.Windows.Latest.xml | 16 + ....BasicTestInCMode.float.Windows.Preview.cs | 17 + ...BasicTestInCMode.float.Windows.Preview.xml | 16 + ...st.BasicTestInCMode.int.Unix.Compatible.cs | 17 + ...t.BasicTestInCMode.int.Unix.Compatible.xml | 16 + ...nTest.BasicTestInCMode.int.Unix.Default.cs | 17 + ...Test.BasicTestInCMode.int.Unix.Default.xml | 16 + ...onTest.BasicTestInCMode.int.Unix.Latest.cs | 17 + ...nTest.BasicTestInCMode.int.Unix.Latest.xml | 16 + ...nTest.BasicTestInCMode.int.Unix.Preview.cs | 17 + ...Test.BasicTestInCMode.int.Unix.Preview.xml | 16 + ...BasicTestInCMode.int.Windows.Compatible.cs | 17 + ...asicTestInCMode.int.Windows.Compatible.xml | 16 + ...st.BasicTestInCMode.int.Windows.Default.cs | 17 + ...t.BasicTestInCMode.int.Windows.Default.xml | 16 + ...est.BasicTestInCMode.int.Windows.Latest.cs | 17 + ...st.BasicTestInCMode.int.Windows.Latest.xml | 16 + ...st.BasicTestInCMode.int.Windows.Preview.cs | 17 + ...t.BasicTestInCMode.int.Windows.Preview.xml | 16 + ....BasicTestInCMode.short.Unix.Compatible.cs | 17 + ...BasicTestInCMode.short.Unix.Compatible.xml | 16 + ...est.BasicTestInCMode.short.Unix.Default.cs | 17 + ...st.BasicTestInCMode.short.Unix.Default.xml | 16 + ...Test.BasicTestInCMode.short.Unix.Latest.cs | 17 + ...est.BasicTestInCMode.short.Unix.Latest.xml | 16 + ...est.BasicTestInCMode.short.Unix.Preview.cs | 17 + ...st.BasicTestInCMode.short.Unix.Preview.xml | 16 + ...sicTestInCMode.short.Windows.Compatible.cs | 17 + ...icTestInCMode.short.Windows.Compatible.xml | 16 + ....BasicTestInCMode.short.Windows.Default.cs | 17 + ...BasicTestInCMode.short.Windows.Default.xml | 16 + ...t.BasicTestInCMode.short.Windows.Latest.cs | 17 + ....BasicTestInCMode.short.Windows.Latest.xml | 16 + ....BasicTestInCMode.short.Windows.Preview.cs | 17 + ...BasicTestInCMode.short.Windows.Preview.xml | 16 + ...NativeTypeNameTest.bool.Unix.Compatible.cs | 20 + ...ativeTypeNameTest.bool.Unix.Compatible.xml | 16 + ...ithNativeTypeNameTest.bool.Unix.Default.cs | 20 + ...thNativeTypeNameTest.bool.Unix.Default.xml | 16 + ...WithNativeTypeNameTest.bool.Unix.Latest.cs | 20 + ...ithNativeTypeNameTest.bool.Unix.Latest.xml | 16 + ...ithNativeTypeNameTest.bool.Unix.Preview.cs | 20 + ...thNativeTypeNameTest.bool.Unix.Preview.xml | 16 + ...iveTypeNameTest.bool.Windows.Compatible.cs | 20 + ...veTypeNameTest.bool.Windows.Compatible.xml | 16 + ...NativeTypeNameTest.bool.Windows.Default.cs | 20 + ...ativeTypeNameTest.bool.Windows.Default.xml | 16 + ...hNativeTypeNameTest.bool.Windows.Latest.cs | 20 + ...NativeTypeNameTest.bool.Windows.Latest.xml | 16 + ...NativeTypeNameTest.bool.Windows.Preview.cs | 20 + ...ativeTypeNameTest.bool.Windows.Preview.xml | 16 + ...eTypeNameTest.long long.Unix.Compatible.cs | 20 + ...TypeNameTest.long long.Unix.Compatible.xml | 16 + ...tiveTypeNameTest.long long.Unix.Default.cs | 20 + ...iveTypeNameTest.long long.Unix.Default.xml | 16 + ...ativeTypeNameTest.long long.Unix.Latest.cs | 20 + ...tiveTypeNameTest.long long.Unix.Latest.xml | 16 + ...tiveTypeNameTest.long long.Unix.Preview.cs | 20 + ...iveTypeNameTest.long long.Unix.Preview.xml | 16 + ...peNameTest.long long.Windows.Compatible.cs | 20 + ...eNameTest.long long.Windows.Compatible.xml | 16 + ...eTypeNameTest.long long.Windows.Default.cs | 20 + ...TypeNameTest.long long.Windows.Default.xml | 16 + ...veTypeNameTest.long long.Windows.Latest.cs | 20 + ...eTypeNameTest.long long.Windows.Latest.xml | 16 + ...eTypeNameTest.long long.Windows.Preview.cs | 20 + ...TypeNameTest.long long.Windows.Preview.xml | 16 + ...ypeNameTest.signed char.Unix.Compatible.cs | 20 + ...peNameTest.signed char.Unix.Compatible.xml | 16 + ...veTypeNameTest.signed char.Unix.Default.cs | 20 + ...eTypeNameTest.signed char.Unix.Default.xml | 16 + ...iveTypeNameTest.signed char.Unix.Latest.cs | 20 + ...veTypeNameTest.signed char.Unix.Latest.xml | 16 + ...veTypeNameTest.signed char.Unix.Preview.cs | 20 + ...eTypeNameTest.signed char.Unix.Preview.xml | 16 + ...NameTest.signed char.Windows.Compatible.cs | 20 + ...ameTest.signed char.Windows.Compatible.xml | 16 + ...ypeNameTest.signed char.Windows.Default.cs | 20 + ...peNameTest.signed char.Windows.Default.xml | 16 + ...TypeNameTest.signed char.Windows.Latest.cs | 20 + ...ypeNameTest.signed char.Windows.Latest.xml | 16 + ...ypeNameTest.signed char.Windows.Preview.cs | 20 + ...peNameTest.signed char.Windows.Preview.xml | 16 + ...eNameTest.unsigned char.Unix.Compatible.cs | 20 + ...NameTest.unsigned char.Unix.Compatible.xml | 16 + ...TypeNameTest.unsigned char.Unix.Default.cs | 20 + ...ypeNameTest.unsigned char.Unix.Default.xml | 16 + ...eTypeNameTest.unsigned char.Unix.Latest.cs | 20 + ...TypeNameTest.unsigned char.Unix.Latest.xml | 16 + ...TypeNameTest.unsigned char.Unix.Preview.cs | 20 + ...ypeNameTest.unsigned char.Unix.Preview.xml | 16 + ...meTest.unsigned char.Windows.Compatible.cs | 20 + ...eTest.unsigned char.Windows.Compatible.xml | 16 + ...eNameTest.unsigned char.Windows.Default.cs | 20 + ...NameTest.unsigned char.Windows.Default.xml | 16 + ...peNameTest.unsigned char.Windows.Latest.cs | 20 + ...eNameTest.unsigned char.Windows.Latest.xml | 16 + ...eNameTest.unsigned char.Windows.Preview.cs | 20 + ...NameTest.unsigned char.Windows.Preview.xml | 16 + ...peNameTest.unsigned int.Unix.Compatible.cs | 20 + ...eNameTest.unsigned int.Unix.Compatible.xml | 16 + ...eTypeNameTest.unsigned int.Unix.Default.cs | 20 + ...TypeNameTest.unsigned int.Unix.Default.xml | 16 + ...veTypeNameTest.unsigned int.Unix.Latest.cs | 20 + ...eTypeNameTest.unsigned int.Unix.Latest.xml | 16 + ...eTypeNameTest.unsigned int.Unix.Preview.cs | 20 + ...TypeNameTest.unsigned int.Unix.Preview.xml | 16 + ...ameTest.unsigned int.Windows.Compatible.cs | 20 + ...meTest.unsigned int.Windows.Compatible.xml | 16 + ...peNameTest.unsigned int.Windows.Default.cs | 20 + ...eNameTest.unsigned int.Windows.Default.xml | 16 + ...ypeNameTest.unsigned int.Windows.Latest.cs | 20 + ...peNameTest.unsigned int.Windows.Latest.xml | 16 + ...peNameTest.unsigned int.Windows.Preview.cs | 20 + ...eNameTest.unsigned int.Windows.Preview.xml | 16 + ...Test.unsigned long long.Unix.Compatible.cs | 20 + ...est.unsigned long long.Unix.Compatible.xml | 16 + ...ameTest.unsigned long long.Unix.Default.cs | 20 + ...meTest.unsigned long long.Unix.Default.xml | 16 + ...NameTest.unsigned long long.Unix.Latest.cs | 20 + ...ameTest.unsigned long long.Unix.Latest.xml | 16 + ...ameTest.unsigned long long.Unix.Preview.cs | 20 + ...meTest.unsigned long long.Unix.Preview.xml | 16 + ...t.unsigned long long.Windows.Compatible.cs | 20 + ....unsigned long long.Windows.Compatible.xml | 16 + ...Test.unsigned long long.Windows.Default.cs | 20 + ...est.unsigned long long.Windows.Default.xml | 16 + ...eTest.unsigned long long.Windows.Latest.cs | 20 + ...Test.unsigned long long.Windows.Latest.xml | 16 + ...Test.unsigned long long.Windows.Preview.cs | 20 + ...est.unsigned long long.Windows.Preview.xml | 16 + ...NameTest.unsigned short.Unix.Compatible.cs | 20 + ...ameTest.unsigned short.Unix.Compatible.xml | 16 + ...ypeNameTest.unsigned short.Unix.Default.cs | 20 + ...peNameTest.unsigned short.Unix.Default.xml | 16 + ...TypeNameTest.unsigned short.Unix.Latest.cs | 20 + ...ypeNameTest.unsigned short.Unix.Latest.xml | 16 + ...ypeNameTest.unsigned short.Unix.Preview.cs | 20 + ...peNameTest.unsigned short.Unix.Preview.xml | 16 + ...eTest.unsigned short.Windows.Compatible.cs | 20 + ...Test.unsigned short.Windows.Compatible.xml | 16 + ...NameTest.unsigned short.Windows.Default.cs | 20 + ...ameTest.unsigned short.Windows.Default.xml | 16 + ...eNameTest.unsigned short.Windows.Latest.cs | 20 + ...NameTest.unsigned short.Windows.Latest.xml | 16 + ...NameTest.unsigned short.Windows.Preview.cs | 20 + ...ameTest.unsigned short.Windows.Preview.xml | 16 + ...rationTest.BitfieldTest.Unix.Compatible.cs | 194 ++ ...ationTest.BitfieldTest.Unix.Compatible.xml | 145 ++ ...clarationTest.BitfieldTest.Unix.Default.cs | 194 ++ ...larationTest.BitfieldTest.Unix.Default.xml | 145 ++ ...eclarationTest.BitfieldTest.Unix.Latest.cs | 194 ++ ...clarationTest.BitfieldTest.Unix.Latest.xml | 145 ++ ...clarationTest.BitfieldTest.Unix.Preview.cs | 194 ++ ...larationTest.BitfieldTest.Unix.Preview.xml | 145 ++ ...ionTest.BitfieldTest.Windows.Compatible.cs | 194 ++ ...onTest.BitfieldTest.Windows.Compatible.xml | 145 ++ ...rationTest.BitfieldTest.Windows.Default.cs | 194 ++ ...ationTest.BitfieldTest.Windows.Default.xml | 145 ++ ...arationTest.BitfieldTest.Windows.Latest.cs | 194 ++ ...rationTest.BitfieldTest.Windows.Latest.xml | 145 ++ ...rationTest.BitfieldTest.Windows.Preview.cs | 194 ++ ...ationTest.BitfieldTest.Windows.Preview.xml | 145 ++ ...arationTest.ExcludeTest.Unix.Compatible.cs | 0 ...rationTest.ExcludeTest.Unix.Compatible.xml | 0 ...eclarationTest.ExcludeTest.Unix.Default.cs | 0 ...clarationTest.ExcludeTest.Unix.Default.xml | 0 ...DeclarationTest.ExcludeTest.Unix.Latest.cs | 0 ...eclarationTest.ExcludeTest.Unix.Latest.xml | 0 ...eclarationTest.ExcludeTest.Unix.Preview.cs | 0 ...clarationTest.ExcludeTest.Unix.Preview.xml | 0 ...tionTest.ExcludeTest.Windows.Compatible.cs | 0 ...ionTest.ExcludeTest.Windows.Compatible.xml | 0 ...arationTest.ExcludeTest.Windows.Default.cs | 0 ...rationTest.ExcludeTest.Windows.Default.xml | 0 ...larationTest.ExcludeTest.Windows.Latest.cs | 0 ...arationTest.ExcludeTest.Windows.Latest.xml | 0 ...arationTest.ExcludeTest.Windows.Preview.cs | 0 ...rationTest.ExcludeTest.Windows.Preview.xml | 0 ...idimensionalTest.double.Unix.Compatible.cs | 69 + ...dimensionalTest.double.Unix.Compatible.xml | 101 + ...ultidimensionalTest.double.Unix.Default.cs | 69 + ...ltidimensionalTest.double.Unix.Default.xml | 102 + ...MultidimensionalTest.double.Unix.Latest.cs | 26 + ...ultidimensionalTest.double.Unix.Latest.xml | 21 + ...ultidimensionalTest.double.Unix.Preview.cs | 26 + ...ltidimensionalTest.double.Unix.Preview.xml | 21 + ...mensionalTest.double.Windows.Compatible.cs | 69 + ...ensionalTest.double.Windows.Compatible.xml | 101 + ...idimensionalTest.double.Windows.Default.cs | 69 + ...dimensionalTest.double.Windows.Default.xml | 102 + ...tidimensionalTest.double.Windows.Latest.cs | 26 + ...idimensionalTest.double.Windows.Latest.xml | 21 + ...idimensionalTest.double.Windows.Preview.cs | 26 + ...dimensionalTest.double.Windows.Preview.xml | 21 + ...tidimensionalTest.float.Unix.Compatible.cs | 69 + ...idimensionalTest.float.Unix.Compatible.xml | 101 + ...MultidimensionalTest.float.Unix.Default.cs | 69 + ...ultidimensionalTest.float.Unix.Default.xml | 102 + ...eMultidimensionalTest.float.Unix.Latest.cs | 26 + ...MultidimensionalTest.float.Unix.Latest.xml | 21 + ...MultidimensionalTest.float.Unix.Preview.cs | 26 + ...ultidimensionalTest.float.Unix.Preview.xml | 21 + ...imensionalTest.float.Windows.Compatible.cs | 69 + ...mensionalTest.float.Windows.Compatible.xml | 101 + ...tidimensionalTest.float.Windows.Default.cs | 69 + ...idimensionalTest.float.Windows.Default.xml | 102 + ...ltidimensionalTest.float.Windows.Latest.cs | 26 + ...tidimensionalTest.float.Windows.Latest.xml | 21 + ...tidimensionalTest.float.Windows.Preview.cs | 26 + ...idimensionalTest.float.Windows.Preview.xml | 21 + ...ultidimensionalTest.int.Unix.Compatible.cs | 69 + ...ltidimensionalTest.int.Unix.Compatible.xml | 101 + ...veMultidimensionalTest.int.Unix.Default.cs | 69 + ...eMultidimensionalTest.int.Unix.Default.xml | 102 + ...iveMultidimensionalTest.int.Unix.Latest.cs | 26 + ...veMultidimensionalTest.int.Unix.Latest.xml | 21 + ...veMultidimensionalTest.int.Unix.Preview.cs | 26 + ...eMultidimensionalTest.int.Unix.Preview.xml | 21 + ...idimensionalTest.int.Windows.Compatible.cs | 69 + ...dimensionalTest.int.Windows.Compatible.xml | 101 + ...ultidimensionalTest.int.Windows.Default.cs | 69 + ...ltidimensionalTest.int.Windows.Default.xml | 102 + ...MultidimensionalTest.int.Windows.Latest.cs | 26 + ...ultidimensionalTest.int.Windows.Latest.xml | 21 + ...ultidimensionalTest.int.Windows.Preview.cs | 26 + ...ltidimensionalTest.int.Windows.Preview.xml | 21 + ...tidimensionalTest.short.Unix.Compatible.cs | 69 + ...idimensionalTest.short.Unix.Compatible.xml | 101 + ...MultidimensionalTest.short.Unix.Default.cs | 69 + ...ultidimensionalTest.short.Unix.Default.xml | 102 + ...eMultidimensionalTest.short.Unix.Latest.cs | 26 + ...MultidimensionalTest.short.Unix.Latest.xml | 21 + ...MultidimensionalTest.short.Unix.Preview.cs | 26 + ...ultidimensionalTest.short.Unix.Preview.xml | 21 + ...imensionalTest.short.Windows.Compatible.cs | 69 + ...mensionalTest.short.Windows.Compatible.xml | 101 + ...tidimensionalTest.short.Windows.Default.cs | 69 + ...idimensionalTest.short.Windows.Default.xml | 102 + ...ltidimensionalTest.short.Windows.Latest.cs | 26 + ...tidimensionalTest.short.Windows.Latest.xml | 21 + ...tidimensionalTest.short.Windows.Preview.cs | 26 + ...idimensionalTest.short.Windows.Preview.xml | 21 + ...NonPrimitiveTest.double.Unix.Compatible.cs | 37 + ...onPrimitiveTest.double.Unix.Compatible.xml | 38 + ...ferNonPrimitiveTest.double.Unix.Default.cs | 37 + ...erNonPrimitiveTest.double.Unix.Default.xml | 39 + ...fferNonPrimitiveTest.double.Unix.Latest.cs | 26 + ...ferNonPrimitiveTest.double.Unix.Latest.xml | 21 + ...ferNonPrimitiveTest.double.Unix.Preview.cs | 26 + ...erNonPrimitiveTest.double.Unix.Preview.xml | 21 + ...PrimitiveTest.double.Windows.Compatible.cs | 37 + ...rimitiveTest.double.Windows.Compatible.xml | 38 + ...NonPrimitiveTest.double.Windows.Default.cs | 37 + ...onPrimitiveTest.double.Windows.Default.xml | 39 + ...rNonPrimitiveTest.double.Windows.Latest.cs | 26 + ...NonPrimitiveTest.double.Windows.Latest.xml | 21 + ...NonPrimitiveTest.double.Windows.Preview.cs | 26 + ...onPrimitiveTest.double.Windows.Preview.xml | 21 + ...rNonPrimitiveTest.float.Unix.Compatible.cs | 37 + ...NonPrimitiveTest.float.Unix.Compatible.xml | 38 + ...fferNonPrimitiveTest.float.Unix.Default.cs | 37 + ...ferNonPrimitiveTest.float.Unix.Default.xml | 39 + ...ufferNonPrimitiveTest.float.Unix.Latest.cs | 26 + ...fferNonPrimitiveTest.float.Unix.Latest.xml | 21 + ...fferNonPrimitiveTest.float.Unix.Preview.cs | 26 + ...ferNonPrimitiveTest.float.Unix.Preview.xml | 21 + ...nPrimitiveTest.float.Windows.Compatible.cs | 37 + ...PrimitiveTest.float.Windows.Compatible.xml | 38 + ...rNonPrimitiveTest.float.Windows.Default.cs | 37 + ...NonPrimitiveTest.float.Windows.Default.xml | 39 + ...erNonPrimitiveTest.float.Windows.Latest.cs | 26 + ...rNonPrimitiveTest.float.Windows.Latest.xml | 21 + ...rNonPrimitiveTest.float.Windows.Preview.cs | 26 + ...NonPrimitiveTest.float.Windows.Preview.xml | 21 + ...ferNonPrimitiveTest.int.Unix.Compatible.cs | 37 + ...erNonPrimitiveTest.int.Unix.Compatible.xml | 38 + ...BufferNonPrimitiveTest.int.Unix.Default.cs | 37 + ...ufferNonPrimitiveTest.int.Unix.Default.xml | 39 + ...dBufferNonPrimitiveTest.int.Unix.Latest.cs | 26 + ...BufferNonPrimitiveTest.int.Unix.Latest.xml | 21 + ...BufferNonPrimitiveTest.int.Unix.Preview.cs | 26 + ...ufferNonPrimitiveTest.int.Unix.Preview.xml | 21 + ...NonPrimitiveTest.int.Windows.Compatible.cs | 37 + ...onPrimitiveTest.int.Windows.Compatible.xml | 38 + ...ferNonPrimitiveTest.int.Windows.Default.cs | 37 + ...erNonPrimitiveTest.int.Windows.Default.xml | 39 + ...fferNonPrimitiveTest.int.Windows.Latest.cs | 26 + ...ferNonPrimitiveTest.int.Windows.Latest.xml | 21 + ...ferNonPrimitiveTest.int.Windows.Preview.cs | 26 + ...erNonPrimitiveTest.int.Windows.Preview.xml | 21 + ...rNonPrimitiveTest.short.Unix.Compatible.cs | 37 + ...NonPrimitiveTest.short.Unix.Compatible.xml | 38 + ...fferNonPrimitiveTest.short.Unix.Default.cs | 37 + ...ferNonPrimitiveTest.short.Unix.Default.xml | 39 + ...ufferNonPrimitiveTest.short.Unix.Latest.cs | 26 + ...fferNonPrimitiveTest.short.Unix.Latest.xml | 21 + ...fferNonPrimitiveTest.short.Unix.Preview.cs | 26 + ...ferNonPrimitiveTest.short.Unix.Preview.xml | 21 + ...nPrimitiveTest.short.Windows.Compatible.cs | 37 + ...PrimitiveTest.short.Windows.Compatible.xml | 38 + ...rNonPrimitiveTest.short.Windows.Default.cs | 37 + ...NonPrimitiveTest.short.Windows.Default.xml | 39 + ...erNonPrimitiveTest.short.Windows.Latest.cs | 26 + ...rNonPrimitiveTest.short.Windows.Latest.xml | 21 + ...rNonPrimitiveTest.short.Windows.Preview.cs | 26 + ...NonPrimitiveTest.short.Windows.Preview.xml | 21 + ...itiveTypedefTest.double.Unix.Compatible.cs | 37 + ...tiveTypedefTest.double.Unix.Compatible.xml | 38 + ...rimitiveTypedefTest.double.Unix.Default.cs | 37 + ...imitiveTypedefTest.double.Unix.Default.xml | 39 + ...PrimitiveTypedefTest.double.Unix.Latest.cs | 26 + ...rimitiveTypedefTest.double.Unix.Latest.xml | 21 + ...rimitiveTypedefTest.double.Unix.Preview.cs | 26 + ...imitiveTypedefTest.double.Unix.Preview.xml | 21 + ...veTypedefTest.double.Windows.Compatible.cs | 37 + ...eTypedefTest.double.Windows.Compatible.xml | 38 + ...itiveTypedefTest.double.Windows.Default.cs | 37 + ...tiveTypedefTest.double.Windows.Default.xml | 39 + ...mitiveTypedefTest.double.Windows.Latest.cs | 26 + ...itiveTypedefTest.double.Windows.Latest.xml | 21 + ...itiveTypedefTest.double.Windows.Preview.cs | 26 + ...tiveTypedefTest.double.Windows.Preview.xml | 21 + ...mitiveTypedefTest.float.Unix.Compatible.cs | 37 + ...itiveTypedefTest.float.Unix.Compatible.xml | 38 + ...PrimitiveTypedefTest.float.Unix.Default.cs | 37 + ...rimitiveTypedefTest.float.Unix.Default.xml | 39 + ...nPrimitiveTypedefTest.float.Unix.Latest.cs | 26 + ...PrimitiveTypedefTest.float.Unix.Latest.xml | 21 + ...PrimitiveTypedefTest.float.Unix.Preview.cs | 26 + ...rimitiveTypedefTest.float.Unix.Preview.xml | 21 + ...iveTypedefTest.float.Windows.Compatible.cs | 37 + ...veTypedefTest.float.Windows.Compatible.xml | 38 + ...mitiveTypedefTest.float.Windows.Default.cs | 37 + ...itiveTypedefTest.float.Windows.Default.xml | 39 + ...imitiveTypedefTest.float.Windows.Latest.cs | 26 + ...mitiveTypedefTest.float.Windows.Latest.xml | 21 + ...mitiveTypedefTest.float.Windows.Preview.cs | 26 + ...itiveTypedefTest.float.Windows.Preview.xml | 21 + ...rimitiveTypedefTest.int.Unix.Compatible.cs | 37 + ...imitiveTypedefTest.int.Unix.Compatible.xml | 38 + ...onPrimitiveTypedefTest.int.Unix.Default.cs | 37 + ...nPrimitiveTypedefTest.int.Unix.Default.xml | 39 + ...NonPrimitiveTypedefTest.int.Unix.Latest.cs | 26 + ...onPrimitiveTypedefTest.int.Unix.Latest.xml | 21 + ...onPrimitiveTypedefTest.int.Unix.Preview.cs | 26 + ...nPrimitiveTypedefTest.int.Unix.Preview.xml | 21 + ...itiveTypedefTest.int.Windows.Compatible.cs | 37 + ...tiveTypedefTest.int.Windows.Compatible.xml | 38 + ...rimitiveTypedefTest.int.Windows.Default.cs | 37 + ...imitiveTypedefTest.int.Windows.Default.xml | 39 + ...PrimitiveTypedefTest.int.Windows.Latest.cs | 26 + ...rimitiveTypedefTest.int.Windows.Latest.xml | 21 + ...rimitiveTypedefTest.int.Windows.Preview.cs | 26 + ...imitiveTypedefTest.int.Windows.Preview.xml | 21 + ...mitiveTypedefTest.short.Unix.Compatible.cs | 37 + ...itiveTypedefTest.short.Unix.Compatible.xml | 38 + ...PrimitiveTypedefTest.short.Unix.Default.cs | 37 + ...rimitiveTypedefTest.short.Unix.Default.xml | 39 + ...nPrimitiveTypedefTest.short.Unix.Latest.cs | 26 + ...PrimitiveTypedefTest.short.Unix.Latest.xml | 21 + ...PrimitiveTypedefTest.short.Unix.Preview.cs | 26 + ...rimitiveTypedefTest.short.Unix.Preview.xml | 21 + ...iveTypedefTest.short.Windows.Compatible.cs | 37 + ...veTypedefTest.short.Windows.Compatible.xml | 38 + ...mitiveTypedefTest.short.Windows.Default.cs | 37 + ...itiveTypedefTest.short.Windows.Default.xml | 39 + ...imitiveTypedefTest.short.Windows.Latest.cs | 26 + ...mitiveTypedefTest.short.Windows.Latest.xml | 21 + ...mitiveTypedefTest.short.Windows.Preview.cs | 26 + ...itiveTypedefTest.short.Windows.Preview.xml | 21 + ...NativeTypeNameTest.bool.Unix.Compatible.cs | 38 + ...ativeTypeNameTest.bool.Unix.Compatible.xml | 38 + ...ithNativeTypeNameTest.bool.Unix.Default.cs | 38 + ...thNativeTypeNameTest.bool.Unix.Default.xml | 39 + ...WithNativeTypeNameTest.bool.Unix.Latest.cs | 27 + ...ithNativeTypeNameTest.bool.Unix.Latest.xml | 21 + ...ithNativeTypeNameTest.bool.Unix.Preview.cs | 27 + ...thNativeTypeNameTest.bool.Unix.Preview.xml | 21 + ...iveTypeNameTest.bool.Windows.Compatible.cs | 38 + ...veTypeNameTest.bool.Windows.Compatible.xml | 38 + ...NativeTypeNameTest.bool.Windows.Default.cs | 38 + ...ativeTypeNameTest.bool.Windows.Default.xml | 39 + ...hNativeTypeNameTest.bool.Windows.Latest.cs | 27 + ...NativeTypeNameTest.bool.Windows.Latest.xml | 21 + ...NativeTypeNameTest.bool.Windows.Preview.cs | 27 + ...ativeTypeNameTest.bool.Windows.Preview.xml | 21 + ...eTypeNameTest.long long.Unix.Compatible.cs | 38 + ...TypeNameTest.long long.Unix.Compatible.xml | 38 + ...tiveTypeNameTest.long long.Unix.Default.cs | 38 + ...iveTypeNameTest.long long.Unix.Default.xml | 39 + ...ativeTypeNameTest.long long.Unix.Latest.cs | 27 + ...tiveTypeNameTest.long long.Unix.Latest.xml | 21 + ...tiveTypeNameTest.long long.Unix.Preview.cs | 27 + ...iveTypeNameTest.long long.Unix.Preview.xml | 21 + ...peNameTest.long long.Windows.Compatible.cs | 38 + ...eNameTest.long long.Windows.Compatible.xml | 38 + ...eTypeNameTest.long long.Windows.Default.cs | 38 + ...TypeNameTest.long long.Windows.Default.xml | 39 + ...veTypeNameTest.long long.Windows.Latest.cs | 27 + ...eTypeNameTest.long long.Windows.Latest.xml | 21 + ...eTypeNameTest.long long.Windows.Preview.cs | 27 + ...TypeNameTest.long long.Windows.Preview.xml | 21 + ...ypeNameTest.signed char.Unix.Compatible.cs | 38 + ...peNameTest.signed char.Unix.Compatible.xml | 38 + ...veTypeNameTest.signed char.Unix.Default.cs | 38 + ...eTypeNameTest.signed char.Unix.Default.xml | 39 + ...iveTypeNameTest.signed char.Unix.Latest.cs | 27 + ...veTypeNameTest.signed char.Unix.Latest.xml | 21 + ...veTypeNameTest.signed char.Unix.Preview.cs | 27 + ...eTypeNameTest.signed char.Unix.Preview.xml | 21 + ...NameTest.signed char.Windows.Compatible.cs | 38 + ...ameTest.signed char.Windows.Compatible.xml | 38 + ...ypeNameTest.signed char.Windows.Default.cs | 38 + ...peNameTest.signed char.Windows.Default.xml | 39 + ...TypeNameTest.signed char.Windows.Latest.cs | 27 + ...ypeNameTest.signed char.Windows.Latest.xml | 21 + ...ypeNameTest.signed char.Windows.Preview.cs | 27 + ...peNameTest.signed char.Windows.Preview.xml | 21 + ...eNameTest.unsigned char.Unix.Compatible.cs | 38 + ...NameTest.unsigned char.Unix.Compatible.xml | 38 + ...TypeNameTest.unsigned char.Unix.Default.cs | 38 + ...ypeNameTest.unsigned char.Unix.Default.xml | 39 + ...eTypeNameTest.unsigned char.Unix.Latest.cs | 27 + ...TypeNameTest.unsigned char.Unix.Latest.xml | 21 + ...TypeNameTest.unsigned char.Unix.Preview.cs | 27 + ...ypeNameTest.unsigned char.Unix.Preview.xml | 21 + ...meTest.unsigned char.Windows.Compatible.cs | 38 + ...eTest.unsigned char.Windows.Compatible.xml | 38 + ...eNameTest.unsigned char.Windows.Default.cs | 38 + ...NameTest.unsigned char.Windows.Default.xml | 39 + ...peNameTest.unsigned char.Windows.Latest.cs | 27 + ...eNameTest.unsigned char.Windows.Latest.xml | 21 + ...eNameTest.unsigned char.Windows.Preview.cs | 27 + ...NameTest.unsigned char.Windows.Preview.xml | 21 + ...peNameTest.unsigned int.Unix.Compatible.cs | 38 + ...eNameTest.unsigned int.Unix.Compatible.xml | 38 + ...eTypeNameTest.unsigned int.Unix.Default.cs | 38 + ...TypeNameTest.unsigned int.Unix.Default.xml | 39 + ...veTypeNameTest.unsigned int.Unix.Latest.cs | 27 + ...eTypeNameTest.unsigned int.Unix.Latest.xml | 21 + ...eTypeNameTest.unsigned int.Unix.Preview.cs | 27 + ...TypeNameTest.unsigned int.Unix.Preview.xml | 21 + ...ameTest.unsigned int.Windows.Compatible.cs | 38 + ...meTest.unsigned int.Windows.Compatible.xml | 38 + ...peNameTest.unsigned int.Windows.Default.cs | 38 + ...eNameTest.unsigned int.Windows.Default.xml | 39 + ...ypeNameTest.unsigned int.Windows.Latest.cs | 27 + ...peNameTest.unsigned int.Windows.Latest.xml | 21 + ...peNameTest.unsigned int.Windows.Preview.cs | 27 + ...eNameTest.unsigned int.Windows.Preview.xml | 21 + ...Test.unsigned long long.Unix.Compatible.cs | 38 + ...est.unsigned long long.Unix.Compatible.xml | 38 + ...ameTest.unsigned long long.Unix.Default.cs | 38 + ...meTest.unsigned long long.Unix.Default.xml | 39 + ...NameTest.unsigned long long.Unix.Latest.cs | 27 + ...ameTest.unsigned long long.Unix.Latest.xml | 21 + ...ameTest.unsigned long long.Unix.Preview.cs | 27 + ...meTest.unsigned long long.Unix.Preview.xml | 21 + ...t.unsigned long long.Windows.Compatible.cs | 38 + ....unsigned long long.Windows.Compatible.xml | 38 + ...Test.unsigned long long.Windows.Default.cs | 38 + ...est.unsigned long long.Windows.Default.xml | 39 + ...eTest.unsigned long long.Windows.Latest.cs | 27 + ...Test.unsigned long long.Windows.Latest.xml | 21 + ...Test.unsigned long long.Windows.Preview.cs | 27 + ...est.unsigned long long.Windows.Preview.xml | 21 + ...NameTest.unsigned short.Unix.Compatible.cs | 38 + ...ameTest.unsigned short.Unix.Compatible.xml | 38 + ...ypeNameTest.unsigned short.Unix.Default.cs | 38 + ...peNameTest.unsigned short.Unix.Default.xml | 39 + ...TypeNameTest.unsigned short.Unix.Latest.cs | 27 + ...ypeNameTest.unsigned short.Unix.Latest.xml | 21 + ...ypeNameTest.unsigned short.Unix.Preview.cs | 27 + ...peNameTest.unsigned short.Unix.Preview.xml | 21 + ...eTest.unsigned short.Windows.Compatible.cs | 38 + ...Test.unsigned short.Windows.Compatible.xml | 38 + ...NameTest.unsigned short.Windows.Default.cs | 38 + ...ameTest.unsigned short.Windows.Default.xml | 39 + ...eNameTest.unsigned short.Windows.Latest.cs | 27 + ...NameTest.unsigned short.Windows.Latest.xml | 21 + ...NameTest.unsigned short.Windows.Preview.cs | 27 + ...ameTest.unsigned short.Windows.Preview.xml | 21 + ...ointerTest.double __ast.Unix.Compatible.cs | 30 + ...interTest.double __ast.Unix.Compatible.xml | 33 + ...erPointerTest.double __ast.Unix.Default.cs | 30 + ...rPointerTest.double __ast.Unix.Default.xml | 33 + ...ferPointerTest.double __ast.Unix.Latest.cs | 30 + ...erPointerTest.double __ast.Unix.Latest.xml | 33 + ...erPointerTest.double __ast.Unix.Preview.cs | 30 + ...rPointerTest.double __ast.Unix.Preview.xml | 33 + ...terTest.double __ast.Windows.Compatible.cs | 30 + ...erTest.double __ast.Windows.Compatible.xml | 33 + ...ointerTest.double __ast.Windows.Default.cs | 30 + ...interTest.double __ast.Windows.Default.xml | 33 + ...PointerTest.double __ast.Windows.Latest.cs | 30 + ...ointerTest.double __ast.Windows.Latest.xml | 33 + ...ointerTest.double __ast.Windows.Preview.cs | 30 + ...interTest.double __ast.Windows.Preview.xml | 33 + ...PointerTest.float __ast.Unix.Compatible.cs | 30 + ...ointerTest.float __ast.Unix.Compatible.xml | 33 + ...ferPointerTest.float __ast.Unix.Default.cs | 30 + ...erPointerTest.float __ast.Unix.Default.xml | 33 + ...fferPointerTest.float __ast.Unix.Latest.cs | 30 + ...ferPointerTest.float __ast.Unix.Latest.xml | 33 + ...ferPointerTest.float __ast.Unix.Preview.cs | 30 + ...erPointerTest.float __ast.Unix.Preview.xml | 33 + ...nterTest.float __ast.Windows.Compatible.cs | 30 + ...terTest.float __ast.Windows.Compatible.xml | 33 + ...PointerTest.float __ast.Windows.Default.cs | 30 + ...ointerTest.float __ast.Windows.Default.xml | 33 + ...rPointerTest.float __ast.Windows.Latest.cs | 30 + ...PointerTest.float __ast.Windows.Latest.xml | 33 + ...PointerTest.float __ast.Windows.Preview.cs | 30 + ...ointerTest.float __ast.Windows.Preview.xml | 33 + ...erPointerTest.int __ast.Unix.Compatible.cs | 30 + ...rPointerTest.int __ast.Unix.Compatible.xml | 33 + ...ufferPointerTest.int __ast.Unix.Default.cs | 30 + ...fferPointerTest.int __ast.Unix.Default.xml | 33 + ...BufferPointerTest.int __ast.Unix.Latest.cs | 30 + ...ufferPointerTest.int __ast.Unix.Latest.xml | 33 + ...ufferPointerTest.int __ast.Unix.Preview.cs | 30 + ...fferPointerTest.int __ast.Unix.Preview.xml | 33 + ...ointerTest.int __ast.Windows.Compatible.cs | 30 + ...interTest.int __ast.Windows.Compatible.xml | 33 + ...erPointerTest.int __ast.Windows.Default.cs | 30 + ...rPointerTest.int __ast.Windows.Default.xml | 33 + ...ferPointerTest.int __ast.Windows.Latest.cs | 30 + ...erPointerTest.int __ast.Windows.Latest.xml | 33 + ...erPointerTest.int __ast.Windows.Preview.cs | 30 + ...rPointerTest.int __ast.Windows.Preview.xml | 33 + ...PointerTest.short __ast.Unix.Compatible.cs | 30 + ...ointerTest.short __ast.Unix.Compatible.xml | 33 + ...ferPointerTest.short __ast.Unix.Default.cs | 30 + ...erPointerTest.short __ast.Unix.Default.xml | 33 + ...fferPointerTest.short __ast.Unix.Latest.cs | 30 + ...ferPointerTest.short __ast.Unix.Latest.xml | 33 + ...ferPointerTest.short __ast.Unix.Preview.cs | 30 + ...erPointerTest.short __ast.Unix.Preview.xml | 33 + ...nterTest.short __ast.Windows.Compatible.cs | 30 + ...terTest.short __ast.Windows.Compatible.xml | 33 + ...PointerTest.short __ast.Windows.Default.cs | 30 + ...ointerTest.short __ast.Windows.Default.xml | 33 + ...rPointerTest.short __ast.Windows.Latest.cs | 30 + ...PointerTest.short __ast.Windows.Latest.xml | 33 + ...PointerTest.short __ast.Windows.Preview.cs | 30 + ...ointerTest.short __ast.Windows.Preview.xml | 33 + ...idimensionalTest.double.Unix.Compatible.cs | 12 + ...dimensionalTest.double.Unix.Compatible.xml | 10 + ...ultidimensionalTest.double.Unix.Default.cs | 12 + ...ltidimensionalTest.double.Unix.Default.xml | 10 + ...MultidimensionalTest.double.Unix.Latest.cs | 19 + ...ultidimensionalTest.double.Unix.Latest.xml | 16 + ...ultidimensionalTest.double.Unix.Preview.cs | 19 + ...ltidimensionalTest.double.Unix.Preview.xml | 16 + ...mensionalTest.double.Windows.Compatible.cs | 12 + ...ensionalTest.double.Windows.Compatible.xml | 10 + ...idimensionalTest.double.Windows.Default.cs | 12 + ...dimensionalTest.double.Windows.Default.xml | 10 + ...tidimensionalTest.double.Windows.Latest.cs | 19 + ...idimensionalTest.double.Windows.Latest.xml | 16 + ...idimensionalTest.double.Windows.Preview.cs | 19 + ...dimensionalTest.double.Windows.Preview.xml | 16 + ...tidimensionalTest.float.Unix.Compatible.cs | 12 + ...idimensionalTest.float.Unix.Compatible.xml | 10 + ...MultidimensionalTest.float.Unix.Default.cs | 12 + ...ultidimensionalTest.float.Unix.Default.xml | 10 + ...eMultidimensionalTest.float.Unix.Latest.cs | 19 + ...MultidimensionalTest.float.Unix.Latest.xml | 16 + ...MultidimensionalTest.float.Unix.Preview.cs | 19 + ...ultidimensionalTest.float.Unix.Preview.xml | 16 + ...imensionalTest.float.Windows.Compatible.cs | 12 + ...mensionalTest.float.Windows.Compatible.xml | 10 + ...tidimensionalTest.float.Windows.Default.cs | 12 + ...idimensionalTest.float.Windows.Default.xml | 10 + ...ltidimensionalTest.float.Windows.Latest.cs | 19 + ...tidimensionalTest.float.Windows.Latest.xml | 16 + ...tidimensionalTest.float.Windows.Preview.cs | 19 + ...idimensionalTest.float.Windows.Preview.xml | 16 + ...ultidimensionalTest.int.Unix.Compatible.cs | 12 + ...ltidimensionalTest.int.Unix.Compatible.xml | 10 + ...veMultidimensionalTest.int.Unix.Default.cs | 12 + ...eMultidimensionalTest.int.Unix.Default.xml | 10 + ...iveMultidimensionalTest.int.Unix.Latest.cs | 19 + ...veMultidimensionalTest.int.Unix.Latest.xml | 16 + ...veMultidimensionalTest.int.Unix.Preview.cs | 19 + ...eMultidimensionalTest.int.Unix.Preview.xml | 16 + ...idimensionalTest.int.Windows.Compatible.cs | 12 + ...dimensionalTest.int.Windows.Compatible.xml | 10 + ...ultidimensionalTest.int.Windows.Default.cs | 12 + ...ltidimensionalTest.int.Windows.Default.xml | 10 + ...MultidimensionalTest.int.Windows.Latest.cs | 19 + ...ultidimensionalTest.int.Windows.Latest.xml | 16 + ...ultidimensionalTest.int.Windows.Preview.cs | 19 + ...ltidimensionalTest.int.Windows.Preview.xml | 16 + ...mensionalTest.long long.Unix.Compatible.cs | 12 + ...ensionalTest.long long.Unix.Compatible.xml | 10 + ...idimensionalTest.long long.Unix.Default.cs | 12 + ...dimensionalTest.long long.Unix.Default.xml | 10 + ...tidimensionalTest.long long.Unix.Latest.cs | 19 + ...idimensionalTest.long long.Unix.Latest.xml | 16 + ...idimensionalTest.long long.Unix.Preview.cs | 19 + ...dimensionalTest.long long.Unix.Preview.xml | 16 + ...sionalTest.long long.Windows.Compatible.cs | 12 + ...ionalTest.long long.Windows.Compatible.xml | 10 + ...mensionalTest.long long.Windows.Default.cs | 12 + ...ensionalTest.long long.Windows.Default.xml | 10 + ...imensionalTest.long long.Windows.Latest.cs | 19 + ...mensionalTest.long long.Windows.Latest.xml | 16 + ...mensionalTest.long long.Windows.Preview.cs | 19 + ...ensionalTest.long long.Windows.Preview.xml | 16 + ...tidimensionalTest.short.Unix.Compatible.cs | 12 + ...idimensionalTest.short.Unix.Compatible.xml | 10 + ...MultidimensionalTest.short.Unix.Default.cs | 12 + ...ultidimensionalTest.short.Unix.Default.xml | 10 + ...eMultidimensionalTest.short.Unix.Latest.cs | 19 + ...MultidimensionalTest.short.Unix.Latest.xml | 16 + ...MultidimensionalTest.short.Unix.Preview.cs | 19 + ...ultidimensionalTest.short.Unix.Preview.xml | 16 + ...imensionalTest.short.Windows.Compatible.cs | 12 + ...mensionalTest.short.Windows.Compatible.xml | 10 + ...tidimensionalTest.short.Windows.Default.cs | 12 + ...idimensionalTest.short.Windows.Default.xml | 10 + ...ltidimensionalTest.short.Windows.Latest.cs | 19 + ...tidimensionalTest.short.Windows.Latest.xml | 16 + ...tidimensionalTest.short.Windows.Preview.cs | 19 + ...idimensionalTest.short.Windows.Preview.xml | 16 + ...nsionalTest.signed char.Unix.Compatible.cs | 12 + ...sionalTest.signed char.Unix.Compatible.xml | 10 + ...imensionalTest.signed char.Unix.Default.cs | 12 + ...mensionalTest.signed char.Unix.Default.xml | 10 + ...dimensionalTest.signed char.Unix.Latest.cs | 19 + ...imensionalTest.signed char.Unix.Latest.xml | 16 + ...imensionalTest.signed char.Unix.Preview.cs | 19 + ...mensionalTest.signed char.Unix.Preview.xml | 16 + ...onalTest.signed char.Windows.Compatible.cs | 12 + ...nalTest.signed char.Windows.Compatible.xml | 10 + ...nsionalTest.signed char.Windows.Default.cs | 12 + ...sionalTest.signed char.Windows.Default.xml | 10 + ...ensionalTest.signed char.Windows.Latest.cs | 19 + ...nsionalTest.signed char.Windows.Latest.xml | 16 + ...nsionalTest.signed char.Windows.Preview.cs | 19 + ...sionalTest.signed char.Windows.Preview.xml | 16 + ...ionalTest.unsigned char.Unix.Compatible.cs | 12 + ...onalTest.unsigned char.Unix.Compatible.xml | 10 + ...ensionalTest.unsigned char.Unix.Default.cs | 12 + ...nsionalTest.unsigned char.Unix.Default.xml | 10 + ...mensionalTest.unsigned char.Unix.Latest.cs | 19 + ...ensionalTest.unsigned char.Unix.Latest.xml | 16 + ...ensionalTest.unsigned char.Unix.Preview.cs | 19 + ...nsionalTest.unsigned char.Unix.Preview.xml | 16 + ...alTest.unsigned char.Windows.Compatible.cs | 12 + ...lTest.unsigned char.Windows.Compatible.xml | 10 + ...ionalTest.unsigned char.Windows.Default.cs | 12 + ...onalTest.unsigned char.Windows.Default.xml | 10 + ...sionalTest.unsigned char.Windows.Latest.cs | 19 + ...ionalTest.unsigned char.Windows.Latest.xml | 16 + ...ionalTest.unsigned char.Windows.Preview.cs | 19 + ...onalTest.unsigned char.Windows.Preview.xml | 16 + ...sionalTest.unsigned int.Unix.Compatible.cs | 12 + ...ionalTest.unsigned int.Unix.Compatible.xml | 10 + ...mensionalTest.unsigned int.Unix.Default.cs | 12 + ...ensionalTest.unsigned int.Unix.Default.xml | 10 + ...imensionalTest.unsigned int.Unix.Latest.cs | 19 + ...mensionalTest.unsigned int.Unix.Latest.xml | 16 + ...mensionalTest.unsigned int.Unix.Preview.cs | 19 + ...ensionalTest.unsigned int.Unix.Preview.xml | 16 + ...nalTest.unsigned int.Windows.Compatible.cs | 12 + ...alTest.unsigned int.Windows.Compatible.xml | 10 + ...sionalTest.unsigned int.Windows.Default.cs | 12 + ...ionalTest.unsigned int.Windows.Default.xml | 10 + ...nsionalTest.unsigned int.Windows.Latest.cs | 19 + ...sionalTest.unsigned int.Windows.Latest.xml | 16 + ...sionalTest.unsigned int.Windows.Preview.cs | 19 + ...ionalTest.unsigned int.Windows.Preview.xml | 16 + ...Test.unsigned long long.Unix.Compatible.cs | 12 + ...est.unsigned long long.Unix.Compatible.xml | 10 + ...nalTest.unsigned long long.Unix.Default.cs | 12 + ...alTest.unsigned long long.Unix.Default.xml | 10 + ...onalTest.unsigned long long.Unix.Latest.cs | 19 + ...nalTest.unsigned long long.Unix.Latest.xml | 16 + ...nalTest.unsigned long long.Unix.Preview.cs | 19 + ...alTest.unsigned long long.Unix.Preview.xml | 16 + ...t.unsigned long long.Windows.Compatible.cs | 12 + ....unsigned long long.Windows.Compatible.xml | 10 + ...Test.unsigned long long.Windows.Default.cs | 12 + ...est.unsigned long long.Windows.Default.xml | 10 + ...lTest.unsigned long long.Windows.Latest.cs | 19 + ...Test.unsigned long long.Windows.Latest.xml | 16 + ...Test.unsigned long long.Windows.Preview.cs | 19 + ...est.unsigned long long.Windows.Preview.xml | 16 + ...onalTest.unsigned short.Unix.Compatible.cs | 12 + ...nalTest.unsigned short.Unix.Compatible.xml | 10 + ...nsionalTest.unsigned short.Unix.Default.cs | 12 + ...sionalTest.unsigned short.Unix.Default.xml | 10 + ...ensionalTest.unsigned short.Unix.Latest.cs | 19 + ...nsionalTest.unsigned short.Unix.Latest.xml | 16 + ...nsionalTest.unsigned short.Unix.Preview.cs | 19 + ...sionalTest.unsigned short.Unix.Preview.xml | 16 + ...lTest.unsigned short.Windows.Compatible.cs | 12 + ...Test.unsigned short.Windows.Compatible.xml | 10 + ...onalTest.unsigned short.Windows.Default.cs | 12 + ...nalTest.unsigned short.Windows.Default.xml | 10 + ...ionalTest.unsigned short.Windows.Latest.cs | 19 + ...onalTest.unsigned short.Windows.Latest.xml | 16 + ...onalTest.unsigned short.Windows.Preview.cs | 19 + ...nalTest.unsigned short.Windows.Preview.xml | 16 + ...ferPrimitiveTest.double.Unix.Compatible.cs | 12 + ...erPrimitiveTest.double.Unix.Compatible.xml | 10 + ...BufferPrimitiveTest.double.Unix.Default.cs | 12 + ...ufferPrimitiveTest.double.Unix.Default.xml | 10 + ...dBufferPrimitiveTest.double.Unix.Latest.cs | 19 + ...BufferPrimitiveTest.double.Unix.Latest.xml | 16 + ...BufferPrimitiveTest.double.Unix.Preview.cs | 19 + ...ufferPrimitiveTest.double.Unix.Preview.xml | 16 + ...PrimitiveTest.double.Windows.Compatible.cs | 12 + ...rimitiveTest.double.Windows.Compatible.xml | 10 + ...ferPrimitiveTest.double.Windows.Default.cs | 12 + ...erPrimitiveTest.double.Windows.Default.xml | 10 + ...fferPrimitiveTest.double.Windows.Latest.cs | 19 + ...ferPrimitiveTest.double.Windows.Latest.xml | 16 + ...ferPrimitiveTest.double.Windows.Preview.cs | 19 + ...erPrimitiveTest.double.Windows.Preview.xml | 16 + ...fferPrimitiveTest.float.Unix.Compatible.cs | 12 + ...ferPrimitiveTest.float.Unix.Compatible.xml | 10 + ...dBufferPrimitiveTest.float.Unix.Default.cs | 12 + ...BufferPrimitiveTest.float.Unix.Default.xml | 10 + ...edBufferPrimitiveTest.float.Unix.Latest.cs | 19 + ...dBufferPrimitiveTest.float.Unix.Latest.xml | 16 + ...dBufferPrimitiveTest.float.Unix.Preview.cs | 19 + ...BufferPrimitiveTest.float.Unix.Preview.xml | 16 + ...rPrimitiveTest.float.Windows.Compatible.cs | 12 + ...PrimitiveTest.float.Windows.Compatible.xml | 10 + ...fferPrimitiveTest.float.Windows.Default.cs | 12 + ...ferPrimitiveTest.float.Windows.Default.xml | 10 + ...ufferPrimitiveTest.float.Windows.Latest.cs | 19 + ...fferPrimitiveTest.float.Windows.Latest.xml | 16 + ...fferPrimitiveTest.float.Windows.Preview.cs | 19 + ...ferPrimitiveTest.float.Windows.Preview.xml | 16 + ...BufferPrimitiveTest.int.Unix.Compatible.cs | 12 + ...ufferPrimitiveTest.int.Unix.Compatible.xml | 10 + ...zedBufferPrimitiveTest.int.Unix.Default.cs | 12 + ...edBufferPrimitiveTest.int.Unix.Default.xml | 10 + ...izedBufferPrimitiveTest.int.Unix.Latest.cs | 19 + ...zedBufferPrimitiveTest.int.Unix.Latest.xml | 16 + ...zedBufferPrimitiveTest.int.Unix.Preview.cs | 19 + ...edBufferPrimitiveTest.int.Unix.Preview.xml | 16 + ...ferPrimitiveTest.int.Windows.Compatible.cs | 12 + ...erPrimitiveTest.int.Windows.Compatible.xml | 10 + ...BufferPrimitiveTest.int.Windows.Default.cs | 12 + ...ufferPrimitiveTest.int.Windows.Default.xml | 10 + ...dBufferPrimitiveTest.int.Windows.Latest.cs | 19 + ...BufferPrimitiveTest.int.Windows.Latest.xml | 16 + ...BufferPrimitiveTest.int.Windows.Preview.cs | 19 + ...ufferPrimitiveTest.int.Windows.Preview.xml | 16 + ...PrimitiveTest.long long.Unix.Compatible.cs | 12 + ...rimitiveTest.long long.Unix.Compatible.xml | 10 + ...ferPrimitiveTest.long long.Unix.Default.cs | 12 + ...erPrimitiveTest.long long.Unix.Default.xml | 10 + ...fferPrimitiveTest.long long.Unix.Latest.cs | 19 + ...ferPrimitiveTest.long long.Unix.Latest.xml | 16 + ...ferPrimitiveTest.long long.Unix.Preview.cs | 19 + ...erPrimitiveTest.long long.Unix.Preview.xml | 16 + ...mitiveTest.long long.Windows.Compatible.cs | 12 + ...itiveTest.long long.Windows.Compatible.xml | 10 + ...PrimitiveTest.long long.Windows.Default.cs | 12 + ...rimitiveTest.long long.Windows.Default.xml | 10 + ...rPrimitiveTest.long long.Windows.Latest.cs | 19 + ...PrimitiveTest.long long.Windows.Latest.xml | 16 + ...PrimitiveTest.long long.Windows.Preview.cs | 19 + ...rimitiveTest.long long.Windows.Preview.xml | 16 + ...fferPrimitiveTest.short.Unix.Compatible.cs | 12 + ...ferPrimitiveTest.short.Unix.Compatible.xml | 10 + ...dBufferPrimitiveTest.short.Unix.Default.cs | 12 + ...BufferPrimitiveTest.short.Unix.Default.xml | 10 + ...edBufferPrimitiveTest.short.Unix.Latest.cs | 19 + ...dBufferPrimitiveTest.short.Unix.Latest.xml | 16 + ...dBufferPrimitiveTest.short.Unix.Preview.cs | 19 + ...BufferPrimitiveTest.short.Unix.Preview.xml | 16 + ...rPrimitiveTest.short.Windows.Compatible.cs | 12 + ...PrimitiveTest.short.Windows.Compatible.xml | 10 + ...fferPrimitiveTest.short.Windows.Default.cs | 12 + ...ferPrimitiveTest.short.Windows.Default.xml | 10 + ...ufferPrimitiveTest.short.Windows.Latest.cs | 19 + ...fferPrimitiveTest.short.Windows.Latest.xml | 16 + ...fferPrimitiveTest.short.Windows.Preview.cs | 19 + ...ferPrimitiveTest.short.Windows.Preview.xml | 16 + ...imitiveTest.signed char.Unix.Compatible.cs | 12 + ...mitiveTest.signed char.Unix.Compatible.xml | 10 + ...rPrimitiveTest.signed char.Unix.Default.cs | 12 + ...PrimitiveTest.signed char.Unix.Default.xml | 10 + ...erPrimitiveTest.signed char.Unix.Latest.cs | 19 + ...rPrimitiveTest.signed char.Unix.Latest.xml | 16 + ...rPrimitiveTest.signed char.Unix.Preview.cs | 19 + ...PrimitiveTest.signed char.Unix.Preview.xml | 16 + ...tiveTest.signed char.Windows.Compatible.cs | 12 + ...iveTest.signed char.Windows.Compatible.xml | 10 + ...imitiveTest.signed char.Windows.Default.cs | 12 + ...mitiveTest.signed char.Windows.Default.xml | 10 + ...rimitiveTest.signed char.Windows.Latest.cs | 19 + ...imitiveTest.signed char.Windows.Latest.xml | 16 + ...imitiveTest.signed char.Windows.Preview.cs | 19 + ...mitiveTest.signed char.Windows.Preview.xml | 16 + ...itiveTest.unsigned char.Unix.Compatible.cs | 12 + ...tiveTest.unsigned char.Unix.Compatible.xml | 10 + ...rimitiveTest.unsigned char.Unix.Default.cs | 12 + ...imitiveTest.unsigned char.Unix.Default.xml | 10 + ...PrimitiveTest.unsigned char.Unix.Latest.cs | 19 + ...rimitiveTest.unsigned char.Unix.Latest.xml | 16 + ...rimitiveTest.unsigned char.Unix.Preview.cs | 19 + ...imitiveTest.unsigned char.Unix.Preview.xml | 16 + ...veTest.unsigned char.Windows.Compatible.cs | 12 + ...eTest.unsigned char.Windows.Compatible.xml | 10 + ...itiveTest.unsigned char.Windows.Default.cs | 12 + ...tiveTest.unsigned char.Windows.Default.xml | 10 + ...mitiveTest.unsigned char.Windows.Latest.cs | 19 + ...itiveTest.unsigned char.Windows.Latest.xml | 16 + ...itiveTest.unsigned char.Windows.Preview.cs | 19 + ...tiveTest.unsigned char.Windows.Preview.xml | 16 + ...mitiveTest.unsigned int.Unix.Compatible.cs | 12 + ...itiveTest.unsigned int.Unix.Compatible.xml | 10 + ...PrimitiveTest.unsigned int.Unix.Default.cs | 12 + ...rimitiveTest.unsigned int.Unix.Default.xml | 10 + ...rPrimitiveTest.unsigned int.Unix.Latest.cs | 19 + ...PrimitiveTest.unsigned int.Unix.Latest.xml | 16 + ...PrimitiveTest.unsigned int.Unix.Preview.cs | 19 + ...rimitiveTest.unsigned int.Unix.Preview.xml | 16 + ...iveTest.unsigned int.Windows.Compatible.cs | 12 + ...veTest.unsigned int.Windows.Compatible.xml | 10 + ...mitiveTest.unsigned int.Windows.Default.cs | 12 + ...itiveTest.unsigned int.Windows.Default.xml | 10 + ...imitiveTest.unsigned int.Windows.Latest.cs | 19 + ...mitiveTest.unsigned int.Windows.Latest.xml | 16 + ...mitiveTest.unsigned int.Windows.Preview.cs | 19 + ...itiveTest.unsigned int.Windows.Preview.xml | 16 + ...Test.unsigned long long.Unix.Compatible.cs | 12 + ...est.unsigned long long.Unix.Compatible.xml | 10 + ...iveTest.unsigned long long.Unix.Default.cs | 12 + ...veTest.unsigned long long.Unix.Default.xml | 10 + ...tiveTest.unsigned long long.Unix.Latest.cs | 19 + ...iveTest.unsigned long long.Unix.Latest.xml | 16 + ...iveTest.unsigned long long.Unix.Preview.cs | 19 + ...veTest.unsigned long long.Unix.Preview.xml | 16 + ...t.unsigned long long.Windows.Compatible.cs | 12 + ....unsigned long long.Windows.Compatible.xml | 10 + ...Test.unsigned long long.Windows.Default.cs | 12 + ...est.unsigned long long.Windows.Default.xml | 10 + ...eTest.unsigned long long.Windows.Latest.cs | 19 + ...Test.unsigned long long.Windows.Latest.xml | 16 + ...Test.unsigned long long.Windows.Preview.cs | 19 + ...est.unsigned long long.Windows.Preview.xml | 16 + ...tiveTest.unsigned short.Unix.Compatible.cs | 12 + ...iveTest.unsigned short.Unix.Compatible.xml | 10 + ...imitiveTest.unsigned short.Unix.Default.cs | 12 + ...mitiveTest.unsigned short.Unix.Default.xml | 10 + ...rimitiveTest.unsigned short.Unix.Latest.cs | 19 + ...imitiveTest.unsigned short.Unix.Latest.xml | 16 + ...imitiveTest.unsigned short.Unix.Preview.cs | 19 + ...mitiveTest.unsigned short.Unix.Preview.xml | 16 + ...eTest.unsigned short.Windows.Compatible.cs | 12 + ...Test.unsigned short.Windows.Compatible.xml | 10 + ...tiveTest.unsigned short.Windows.Default.cs | 12 + ...iveTest.unsigned short.Windows.Default.xml | 10 + ...itiveTest.unsigned short.Windows.Latest.cs | 19 + ...tiveTest.unsigned short.Windows.Latest.xml | 16 + ...tiveTest.unsigned short.Windows.Preview.cs | 19 + ...iveTest.unsigned short.Windows.Preview.xml | 16 + ...itiveTypedefTest.double.Unix.Compatible.cs | 12 + ...tiveTypedefTest.double.Unix.Compatible.xml | 10 + ...rimitiveTypedefTest.double.Unix.Default.cs | 12 + ...imitiveTypedefTest.double.Unix.Default.xml | 10 + ...PrimitiveTypedefTest.double.Unix.Latest.cs | 19 + ...rimitiveTypedefTest.double.Unix.Latest.xml | 16 + ...rimitiveTypedefTest.double.Unix.Preview.cs | 19 + ...imitiveTypedefTest.double.Unix.Preview.xml | 16 + ...veTypedefTest.double.Windows.Compatible.cs | 12 + ...eTypedefTest.double.Windows.Compatible.xml | 10 + ...itiveTypedefTest.double.Windows.Default.cs | 12 + ...tiveTypedefTest.double.Windows.Default.xml | 10 + ...mitiveTypedefTest.double.Windows.Latest.cs | 19 + ...itiveTypedefTest.double.Windows.Latest.xml | 16 + ...itiveTypedefTest.double.Windows.Preview.cs | 19 + ...tiveTypedefTest.double.Windows.Preview.xml | 16 + ...mitiveTypedefTest.float.Unix.Compatible.cs | 12 + ...itiveTypedefTest.float.Unix.Compatible.xml | 10 + ...PrimitiveTypedefTest.float.Unix.Default.cs | 12 + ...rimitiveTypedefTest.float.Unix.Default.xml | 10 + ...rPrimitiveTypedefTest.float.Unix.Latest.cs | 19 + ...PrimitiveTypedefTest.float.Unix.Latest.xml | 16 + ...PrimitiveTypedefTest.float.Unix.Preview.cs | 19 + ...rimitiveTypedefTest.float.Unix.Preview.xml | 16 + ...iveTypedefTest.float.Windows.Compatible.cs | 12 + ...veTypedefTest.float.Windows.Compatible.xml | 10 + ...mitiveTypedefTest.float.Windows.Default.cs | 12 + ...itiveTypedefTest.float.Windows.Default.xml | 10 + ...imitiveTypedefTest.float.Windows.Latest.cs | 19 + ...mitiveTypedefTest.float.Windows.Latest.xml | 16 + ...mitiveTypedefTest.float.Windows.Preview.cs | 19 + ...itiveTypedefTest.float.Windows.Preview.xml | 16 + ...rimitiveTypedefTest.int.Unix.Compatible.cs | 12 + ...imitiveTypedefTest.int.Unix.Compatible.xml | 10 + ...erPrimitiveTypedefTest.int.Unix.Default.cs | 12 + ...rPrimitiveTypedefTest.int.Unix.Default.xml | 10 + ...ferPrimitiveTypedefTest.int.Unix.Latest.cs | 19 + ...erPrimitiveTypedefTest.int.Unix.Latest.xml | 16 + ...erPrimitiveTypedefTest.int.Unix.Preview.cs | 19 + ...rPrimitiveTypedefTest.int.Unix.Preview.xml | 16 + ...itiveTypedefTest.int.Windows.Compatible.cs | 12 + ...tiveTypedefTest.int.Windows.Compatible.xml | 10 + ...rimitiveTypedefTest.int.Windows.Default.cs | 12 + ...imitiveTypedefTest.int.Windows.Default.xml | 10 + ...PrimitiveTypedefTest.int.Windows.Latest.cs | 19 + ...rimitiveTypedefTest.int.Windows.Latest.xml | 16 + ...rimitiveTypedefTest.int.Windows.Preview.cs | 19 + ...imitiveTypedefTest.int.Windows.Preview.xml | 16 + ...veTypedefTest.long long.Unix.Compatible.cs | 12 + ...eTypedefTest.long long.Unix.Compatible.xml | 10 + ...itiveTypedefTest.long long.Unix.Default.cs | 12 + ...tiveTypedefTest.long long.Unix.Default.xml | 10 + ...mitiveTypedefTest.long long.Unix.Latest.cs | 19 + ...itiveTypedefTest.long long.Unix.Latest.xml | 16 + ...itiveTypedefTest.long long.Unix.Preview.cs | 19 + ...tiveTypedefTest.long long.Unix.Preview.xml | 16 + ...ypedefTest.long long.Windows.Compatible.cs | 12 + ...pedefTest.long long.Windows.Compatible.xml | 10 + ...veTypedefTest.long long.Windows.Default.cs | 12 + ...eTypedefTest.long long.Windows.Default.xml | 10 + ...iveTypedefTest.long long.Windows.Latest.cs | 19 + ...veTypedefTest.long long.Windows.Latest.xml | 16 + ...veTypedefTest.long long.Windows.Preview.cs | 19 + ...eTypedefTest.long long.Windows.Preview.xml | 16 + ...mitiveTypedefTest.short.Unix.Compatible.cs | 12 + ...itiveTypedefTest.short.Unix.Compatible.xml | 10 + ...PrimitiveTypedefTest.short.Unix.Default.cs | 12 + ...rimitiveTypedefTest.short.Unix.Default.xml | 10 + ...rPrimitiveTypedefTest.short.Unix.Latest.cs | 19 + ...PrimitiveTypedefTest.short.Unix.Latest.xml | 16 + ...PrimitiveTypedefTest.short.Unix.Preview.cs | 19 + ...rimitiveTypedefTest.short.Unix.Preview.xml | 16 + ...iveTypedefTest.short.Windows.Compatible.cs | 12 + ...veTypedefTest.short.Windows.Compatible.xml | 10 + ...mitiveTypedefTest.short.Windows.Default.cs | 12 + ...itiveTypedefTest.short.Windows.Default.xml | 10 + ...imitiveTypedefTest.short.Windows.Latest.cs | 19 + ...mitiveTypedefTest.short.Windows.Latest.xml | 16 + ...mitiveTypedefTest.short.Windows.Preview.cs | 19 + ...itiveTypedefTest.short.Windows.Preview.xml | 16 + ...TypedefTest.signed char.Unix.Compatible.cs | 12 + ...ypedefTest.signed char.Unix.Compatible.xml | 10 + ...iveTypedefTest.signed char.Unix.Default.cs | 12 + ...veTypedefTest.signed char.Unix.Default.xml | 10 + ...tiveTypedefTest.signed char.Unix.Latest.cs | 19 + ...iveTypedefTest.signed char.Unix.Latest.xml | 16 + ...iveTypedefTest.signed char.Unix.Preview.cs | 19 + ...veTypedefTest.signed char.Unix.Preview.xml | 16 + ...edefTest.signed char.Windows.Compatible.cs | 12 + ...defTest.signed char.Windows.Compatible.xml | 10 + ...TypedefTest.signed char.Windows.Default.cs | 12 + ...ypedefTest.signed char.Windows.Default.xml | 10 + ...eTypedefTest.signed char.Windows.Latest.cs | 19 + ...TypedefTest.signed char.Windows.Latest.xml | 16 + ...TypedefTest.signed char.Windows.Preview.cs | 19 + ...ypedefTest.signed char.Windows.Preview.xml | 16 + ...pedefTest.unsigned char.Unix.Compatible.cs | 12 + ...edefTest.unsigned char.Unix.Compatible.xml | 10 + ...eTypedefTest.unsigned char.Unix.Default.cs | 12 + ...TypedefTest.unsigned char.Unix.Default.xml | 10 + ...veTypedefTest.unsigned char.Unix.Latest.cs | 19 + ...eTypedefTest.unsigned char.Unix.Latest.xml | 16 + ...eTypedefTest.unsigned char.Unix.Preview.cs | 19 + ...TypedefTest.unsigned char.Unix.Preview.xml | 16 + ...efTest.unsigned char.Windows.Compatible.cs | 12 + ...fTest.unsigned char.Windows.Compatible.xml | 10 + ...pedefTest.unsigned char.Windows.Default.cs | 12 + ...edefTest.unsigned char.Windows.Default.xml | 10 + ...ypedefTest.unsigned char.Windows.Latest.cs | 19 + ...pedefTest.unsigned char.Windows.Latest.xml | 16 + ...pedefTest.unsigned char.Windows.Preview.cs | 19 + ...edefTest.unsigned char.Windows.Preview.xml | 16 + ...ypedefTest.unsigned int.Unix.Compatible.cs | 12 + ...pedefTest.unsigned int.Unix.Compatible.xml | 10 + ...veTypedefTest.unsigned int.Unix.Default.cs | 12 + ...eTypedefTest.unsigned int.Unix.Default.xml | 10 + ...iveTypedefTest.unsigned int.Unix.Latest.cs | 19 + ...veTypedefTest.unsigned int.Unix.Latest.xml | 16 + ...veTypedefTest.unsigned int.Unix.Preview.cs | 19 + ...eTypedefTest.unsigned int.Unix.Preview.xml | 16 + ...defTest.unsigned int.Windows.Compatible.cs | 12 + ...efTest.unsigned int.Windows.Compatible.xml | 10 + ...ypedefTest.unsigned int.Windows.Default.cs | 12 + ...pedefTest.unsigned int.Windows.Default.xml | 10 + ...TypedefTest.unsigned int.Windows.Latest.cs | 19 + ...ypedefTest.unsigned int.Windows.Latest.xml | 16 + ...ypedefTest.unsigned int.Windows.Preview.cs | 19 + ...pedefTest.unsigned int.Windows.Preview.xml | 16 + ...Test.unsigned long long.Unix.Compatible.cs | 12 + ...est.unsigned long long.Unix.Compatible.xml | 10 + ...defTest.unsigned long long.Unix.Default.cs | 12 + ...efTest.unsigned long long.Unix.Default.xml | 10 + ...edefTest.unsigned long long.Unix.Latest.cs | 19 + ...defTest.unsigned long long.Unix.Latest.xml | 16 + ...defTest.unsigned long long.Unix.Preview.cs | 19 + ...efTest.unsigned long long.Unix.Preview.xml | 16 + ...t.unsigned long long.Windows.Compatible.cs | 12 + ....unsigned long long.Windows.Compatible.xml | 10 + ...Test.unsigned long long.Windows.Default.cs | 12 + ...est.unsigned long long.Windows.Default.xml | 10 + ...fTest.unsigned long long.Windows.Latest.cs | 19 + ...Test.unsigned long long.Windows.Latest.xml | 16 + ...Test.unsigned long long.Windows.Preview.cs | 19 + ...est.unsigned long long.Windows.Preview.xml | 16 + ...edefTest.unsigned short.Unix.Compatible.cs | 12 + ...defTest.unsigned short.Unix.Compatible.xml | 10 + ...TypedefTest.unsigned short.Unix.Default.cs | 12 + ...ypedefTest.unsigned short.Unix.Default.xml | 10 + ...eTypedefTest.unsigned short.Unix.Latest.cs | 19 + ...TypedefTest.unsigned short.Unix.Latest.xml | 16 + ...TypedefTest.unsigned short.Unix.Preview.cs | 19 + ...ypedefTest.unsigned short.Unix.Preview.xml | 16 + ...fTest.unsigned short.Windows.Compatible.cs | 12 + ...Test.unsigned short.Windows.Compatible.xml | 10 + ...edefTest.unsigned short.Windows.Default.cs | 12 + ...defTest.unsigned short.Windows.Default.xml | 10 + ...pedefTest.unsigned short.Windows.Latest.cs | 19 + ...edefTest.unsigned short.Windows.Latest.xml | 16 + ...edefTest.unsigned short.Windows.Preview.cs | 19 + ...defTest.unsigned short.Windows.Preview.xml | 16 + ...arationTest.GuidTest.Windows.Compatible.cs | 28 + ...rationTest.GuidTest.Windows.Compatible.xml | 19 + ...eclarationTest.GuidTest.Windows.Default.cs | 28 + ...clarationTest.GuidTest.Windows.Default.xml | 19 + ...DeclarationTest.GuidTest.Windows.Latest.cs | 28 + ...eclarationTest.GuidTest.Windows.Latest.xml | 19 + ...eclarationTest.GuidTest.Windows.Preview.cs | 28 + ...clarationTest.GuidTest.Windows.Preview.xml | 19 + ...tedAnonymousTest.double.Unix.Compatible.cs | 73 + ...edAnonymousTest.double.Unix.Compatible.xml | 62 + ...NestedAnonymousTest.double.Unix.Default.cs | 65 + ...estedAnonymousTest.double.Unix.Default.xml | 53 + ....NestedAnonymousTest.double.Unix.Latest.cs | 76 + ...NestedAnonymousTest.double.Unix.Latest.xml | 59 + ...NestedAnonymousTest.double.Unix.Preview.cs | 76 + ...estedAnonymousTest.double.Unix.Preview.xml | 59 + ...AnonymousTest.double.Windows.Compatible.cs | 73 + ...nonymousTest.double.Windows.Compatible.xml | 62 + ...tedAnonymousTest.double.Windows.Default.cs | 65 + ...edAnonymousTest.double.Windows.Default.xml | 53 + ...stedAnonymousTest.double.Windows.Latest.cs | 76 + ...tedAnonymousTest.double.Windows.Latest.xml | 59 + ...tedAnonymousTest.double.Windows.Preview.cs | 76 + ...edAnonymousTest.double.Windows.Preview.xml | 59 + ...stedAnonymousTest.float.Unix.Compatible.cs | 73 + ...tedAnonymousTest.float.Unix.Compatible.xml | 62 + ....NestedAnonymousTest.float.Unix.Default.cs | 65 + ...NestedAnonymousTest.float.Unix.Default.xml | 53 + ...t.NestedAnonymousTest.float.Unix.Latest.cs | 76 + ....NestedAnonymousTest.float.Unix.Latest.xml | 59 + ....NestedAnonymousTest.float.Unix.Preview.cs | 76 + ...NestedAnonymousTest.float.Unix.Preview.xml | 59 + ...dAnonymousTest.float.Windows.Compatible.cs | 73 + ...AnonymousTest.float.Windows.Compatible.xml | 62 + ...stedAnonymousTest.float.Windows.Default.cs | 65 + ...tedAnonymousTest.float.Windows.Default.xml | 53 + ...estedAnonymousTest.float.Windows.Latest.cs | 76 + ...stedAnonymousTest.float.Windows.Latest.xml | 59 + ...stedAnonymousTest.float.Windows.Preview.cs | 76 + ...tedAnonymousTest.float.Windows.Preview.xml | 59 + ...NestedAnonymousTest.int.Unix.Compatible.cs | 73 + ...estedAnonymousTest.int.Unix.Compatible.xml | 62 + ...st.NestedAnonymousTest.int.Unix.Default.cs | 65 + ...t.NestedAnonymousTest.int.Unix.Default.xml | 53 + ...est.NestedAnonymousTest.int.Unix.Latest.cs | 76 + ...st.NestedAnonymousTest.int.Unix.Latest.xml | 59 + ...st.NestedAnonymousTest.int.Unix.Preview.cs | 76 + ...t.NestedAnonymousTest.int.Unix.Preview.xml | 59 + ...tedAnonymousTest.int.Windows.Compatible.cs | 73 + ...edAnonymousTest.int.Windows.Compatible.xml | 62 + ...NestedAnonymousTest.int.Windows.Default.cs | 65 + ...estedAnonymousTest.int.Windows.Default.xml | 53 + ....NestedAnonymousTest.int.Windows.Latest.cs | 76 + ...NestedAnonymousTest.int.Windows.Latest.xml | 59 + ...NestedAnonymousTest.int.Windows.Preview.cs | 76 + ...estedAnonymousTest.int.Windows.Preview.xml | 59 + ...stedAnonymousTest.short.Unix.Compatible.cs | 73 + ...tedAnonymousTest.short.Unix.Compatible.xml | 62 + ....NestedAnonymousTest.short.Unix.Default.cs | 65 + ...NestedAnonymousTest.short.Unix.Default.xml | 53 + ...t.NestedAnonymousTest.short.Unix.Latest.cs | 76 + ....NestedAnonymousTest.short.Unix.Latest.xml | 59 + ....NestedAnonymousTest.short.Unix.Preview.cs | 76 + ...NestedAnonymousTest.short.Unix.Preview.xml | 59 + ...dAnonymousTest.short.Windows.Compatible.cs | 73 + ...AnonymousTest.short.Windows.Compatible.xml | 62 + ...stedAnonymousTest.short.Windows.Default.cs | 65 + ...tedAnonymousTest.short.Windows.Default.xml | 53 + ...estedAnonymousTest.short.Windows.Latest.cs | 76 + ...stedAnonymousTest.short.Windows.Latest.xml | 59 + ...stedAnonymousTest.short.Windows.Preview.cs | 76 + ...tedAnonymousTest.short.Windows.Preview.xml | 59 + ...onymousWithBitfieldTest.Unix.Compatible.cs | 115 + ...nymousWithBitfieldTest.Unix.Compatible.xml | 88 + ...dAnonymousWithBitfieldTest.Unix.Default.cs | 109 + ...AnonymousWithBitfieldTest.Unix.Default.xml | 82 + ...edAnonymousWithBitfieldTest.Unix.Latest.cs | 112 + ...dAnonymousWithBitfieldTest.Unix.Latest.xml | 82 + ...dAnonymousWithBitfieldTest.Unix.Preview.cs | 112 + ...AnonymousWithBitfieldTest.Unix.Preview.xml | 82 + ...mousWithBitfieldTest.Windows.Compatible.cs | 115 + ...ousWithBitfieldTest.Windows.Compatible.xml | 88 + ...onymousWithBitfieldTest.Windows.Default.cs | 109 + ...nymousWithBitfieldTest.Windows.Default.xml | 82 + ...nonymousWithBitfieldTest.Windows.Latest.cs | 112 + ...onymousWithBitfieldTest.Windows.Latest.xml | 82 + ...onymousWithBitfieldTest.Windows.Preview.cs | 112 + ...nymousWithBitfieldTest.Windows.Preview.xml | 82 + ...nTest.NestedTest.double.Unix.Compatible.cs | 33 + ...Test.NestedTest.double.Unix.Compatible.xml | 30 + ...tionTest.NestedTest.double.Unix.Default.cs | 33 + ...ionTest.NestedTest.double.Unix.Default.xml | 30 + ...ationTest.NestedTest.double.Unix.Latest.cs | 33 + ...tionTest.NestedTest.double.Unix.Latest.xml | 30 + ...tionTest.NestedTest.double.Unix.Preview.cs | 33 + ...ionTest.NestedTest.double.Unix.Preview.xml | 30 + ...st.NestedTest.double.Windows.Compatible.cs | 33 + ...t.NestedTest.double.Windows.Compatible.xml | 30 + ...nTest.NestedTest.double.Windows.Default.cs | 33 + ...Test.NestedTest.double.Windows.Default.xml | 30 + ...onTest.NestedTest.double.Windows.Latest.cs | 33 + ...nTest.NestedTest.double.Windows.Latest.xml | 30 + ...nTest.NestedTest.double.Windows.Preview.cs | 33 + ...Test.NestedTest.double.Windows.Preview.xml | 30 + ...onTest.NestedTest.float.Unix.Compatible.cs | 33 + ...nTest.NestedTest.float.Unix.Compatible.xml | 30 + ...ationTest.NestedTest.float.Unix.Default.cs | 33 + ...tionTest.NestedTest.float.Unix.Default.xml | 30 + ...rationTest.NestedTest.float.Unix.Latest.cs | 33 + ...ationTest.NestedTest.float.Unix.Latest.xml | 30 + ...ationTest.NestedTest.float.Unix.Preview.cs | 33 + ...tionTest.NestedTest.float.Unix.Preview.xml | 30 + ...est.NestedTest.float.Windows.Compatible.cs | 33 + ...st.NestedTest.float.Windows.Compatible.xml | 30 + ...onTest.NestedTest.float.Windows.Default.cs | 33 + ...nTest.NestedTest.float.Windows.Default.xml | 30 + ...ionTest.NestedTest.float.Windows.Latest.cs | 33 + ...onTest.NestedTest.float.Windows.Latest.xml | 30 + ...onTest.NestedTest.float.Windows.Preview.cs | 33 + ...nTest.NestedTest.float.Windows.Preview.xml | 30 + ...tionTest.NestedTest.int.Unix.Compatible.cs | 33 + ...ionTest.NestedTest.int.Unix.Compatible.xml | 30 + ...arationTest.NestedTest.int.Unix.Default.cs | 33 + ...rationTest.NestedTest.int.Unix.Default.xml | 30 + ...larationTest.NestedTest.int.Unix.Latest.cs | 33 + ...arationTest.NestedTest.int.Unix.Latest.xml | 30 + ...arationTest.NestedTest.int.Unix.Preview.cs | 33 + ...rationTest.NestedTest.int.Unix.Preview.xml | 30 + ...nTest.NestedTest.int.Windows.Compatible.cs | 33 + ...Test.NestedTest.int.Windows.Compatible.xml | 30 + ...tionTest.NestedTest.int.Windows.Default.cs | 33 + ...ionTest.NestedTest.int.Windows.Default.xml | 30 + ...ationTest.NestedTest.int.Windows.Latest.cs | 33 + ...tionTest.NestedTest.int.Windows.Latest.xml | 30 + ...tionTest.NestedTest.int.Windows.Preview.cs | 33 + ...ionTest.NestedTest.int.Windows.Preview.xml | 30 + ...onTest.NestedTest.short.Unix.Compatible.cs | 33 + ...nTest.NestedTest.short.Unix.Compatible.xml | 30 + ...ationTest.NestedTest.short.Unix.Default.cs | 33 + ...tionTest.NestedTest.short.Unix.Default.xml | 30 + ...rationTest.NestedTest.short.Unix.Latest.cs | 33 + ...ationTest.NestedTest.short.Unix.Latest.xml | 30 + ...ationTest.NestedTest.short.Unix.Preview.cs | 33 + ...tionTest.NestedTest.short.Unix.Preview.xml | 30 + ...est.NestedTest.short.Windows.Compatible.cs | 33 + ...st.NestedTest.short.Windows.Compatible.xml | 30 + ...onTest.NestedTest.short.Windows.Default.cs | 33 + ...nTest.NestedTest.short.Windows.Default.xml | 30 + ...ionTest.NestedTest.short.Windows.Latest.cs | 33 + ...onTest.NestedTest.short.Windows.Latest.xml | 30 + ...onTest.NestedTest.short.Windows.Preview.cs | 33 + ...nTest.NestedTest.short.Windows.Preview.xml | 30 + ...NativeTypeNameTest.bool.Unix.Compatible.cs | 40 + ...ativeTypeNameTest.bool.Unix.Compatible.xml | 30 + ...ithNativeTypeNameTest.bool.Unix.Default.cs | 40 + ...thNativeTypeNameTest.bool.Unix.Default.xml | 30 + ...WithNativeTypeNameTest.bool.Unix.Latest.cs | 40 + ...ithNativeTypeNameTest.bool.Unix.Latest.xml | 30 + ...ithNativeTypeNameTest.bool.Unix.Preview.cs | 40 + ...thNativeTypeNameTest.bool.Unix.Preview.xml | 30 + ...iveTypeNameTest.bool.Windows.Compatible.cs | 40 + ...veTypeNameTest.bool.Windows.Compatible.xml | 30 + ...NativeTypeNameTest.bool.Windows.Default.cs | 40 + ...ativeTypeNameTest.bool.Windows.Default.xml | 30 + ...hNativeTypeNameTest.bool.Windows.Latest.cs | 40 + ...NativeTypeNameTest.bool.Windows.Latest.xml | 30 + ...NativeTypeNameTest.bool.Windows.Preview.cs | 40 + ...ativeTypeNameTest.bool.Windows.Preview.xml | 30 + ...eTypeNameTest.long long.Unix.Compatible.cs | 40 + ...TypeNameTest.long long.Unix.Compatible.xml | 30 + ...tiveTypeNameTest.long long.Unix.Default.cs | 40 + ...iveTypeNameTest.long long.Unix.Default.xml | 30 + ...ativeTypeNameTest.long long.Unix.Latest.cs | 40 + ...tiveTypeNameTest.long long.Unix.Latest.xml | 30 + ...tiveTypeNameTest.long long.Unix.Preview.cs | 40 + ...iveTypeNameTest.long long.Unix.Preview.xml | 30 + ...peNameTest.long long.Windows.Compatible.cs | 40 + ...eNameTest.long long.Windows.Compatible.xml | 30 + ...eTypeNameTest.long long.Windows.Default.cs | 40 + ...TypeNameTest.long long.Windows.Default.xml | 30 + ...veTypeNameTest.long long.Windows.Latest.cs | 40 + ...eTypeNameTest.long long.Windows.Latest.xml | 30 + ...eTypeNameTest.long long.Windows.Preview.cs | 40 + ...TypeNameTest.long long.Windows.Preview.xml | 30 + ...ypeNameTest.signed char.Unix.Compatible.cs | 40 + ...peNameTest.signed char.Unix.Compatible.xml | 30 + ...veTypeNameTest.signed char.Unix.Default.cs | 40 + ...eTypeNameTest.signed char.Unix.Default.xml | 30 + ...iveTypeNameTest.signed char.Unix.Latest.cs | 40 + ...veTypeNameTest.signed char.Unix.Latest.xml | 30 + ...veTypeNameTest.signed char.Unix.Preview.cs | 40 + ...eTypeNameTest.signed char.Unix.Preview.xml | 30 + ...NameTest.signed char.Windows.Compatible.cs | 40 + ...ameTest.signed char.Windows.Compatible.xml | 30 + ...ypeNameTest.signed char.Windows.Default.cs | 40 + ...peNameTest.signed char.Windows.Default.xml | 30 + ...TypeNameTest.signed char.Windows.Latest.cs | 40 + ...ypeNameTest.signed char.Windows.Latest.xml | 30 + ...ypeNameTest.signed char.Windows.Preview.cs | 40 + ...peNameTest.signed char.Windows.Preview.xml | 30 + ...eNameTest.unsigned char.Unix.Compatible.cs | 40 + ...NameTest.unsigned char.Unix.Compatible.xml | 30 + ...TypeNameTest.unsigned char.Unix.Default.cs | 40 + ...ypeNameTest.unsigned char.Unix.Default.xml | 30 + ...eTypeNameTest.unsigned char.Unix.Latest.cs | 40 + ...TypeNameTest.unsigned char.Unix.Latest.xml | 30 + ...TypeNameTest.unsigned char.Unix.Preview.cs | 40 + ...ypeNameTest.unsigned char.Unix.Preview.xml | 30 + ...meTest.unsigned char.Windows.Compatible.cs | 40 + ...eTest.unsigned char.Windows.Compatible.xml | 30 + ...eNameTest.unsigned char.Windows.Default.cs | 40 + ...NameTest.unsigned char.Windows.Default.xml | 30 + ...peNameTest.unsigned char.Windows.Latest.cs | 40 + ...eNameTest.unsigned char.Windows.Latest.xml | 30 + ...eNameTest.unsigned char.Windows.Preview.cs | 40 + ...NameTest.unsigned char.Windows.Preview.xml | 30 + ...peNameTest.unsigned int.Unix.Compatible.cs | 40 + ...eNameTest.unsigned int.Unix.Compatible.xml | 30 + ...eTypeNameTest.unsigned int.Unix.Default.cs | 40 + ...TypeNameTest.unsigned int.Unix.Default.xml | 30 + ...veTypeNameTest.unsigned int.Unix.Latest.cs | 40 + ...eTypeNameTest.unsigned int.Unix.Latest.xml | 30 + ...eTypeNameTest.unsigned int.Unix.Preview.cs | 40 + ...TypeNameTest.unsigned int.Unix.Preview.xml | 30 + ...ameTest.unsigned int.Windows.Compatible.cs | 40 + ...meTest.unsigned int.Windows.Compatible.xml | 30 + ...peNameTest.unsigned int.Windows.Default.cs | 40 + ...eNameTest.unsigned int.Windows.Default.xml | 30 + ...ypeNameTest.unsigned int.Windows.Latest.cs | 40 + ...peNameTest.unsigned int.Windows.Latest.xml | 30 + ...peNameTest.unsigned int.Windows.Preview.cs | 40 + ...eNameTest.unsigned int.Windows.Preview.xml | 30 + ...Test.unsigned long long.Unix.Compatible.cs | 40 + ...est.unsigned long long.Unix.Compatible.xml | 30 + ...ameTest.unsigned long long.Unix.Default.cs | 40 + ...meTest.unsigned long long.Unix.Default.xml | 30 + ...NameTest.unsigned long long.Unix.Latest.cs | 40 + ...ameTest.unsigned long long.Unix.Latest.xml | 30 + ...ameTest.unsigned long long.Unix.Preview.cs | 40 + ...meTest.unsigned long long.Unix.Preview.xml | 30 + ...t.unsigned long long.Windows.Compatible.cs | 40 + ....unsigned long long.Windows.Compatible.xml | 30 + ...Test.unsigned long long.Windows.Default.cs | 40 + ...est.unsigned long long.Windows.Default.xml | 30 + ...eTest.unsigned long long.Windows.Latest.cs | 40 + ...Test.unsigned long long.Windows.Latest.xml | 30 + ...Test.unsigned long long.Windows.Preview.cs | 40 + ...est.unsigned long long.Windows.Preview.xml | 30 + ...NameTest.unsigned short.Unix.Compatible.cs | 40 + ...ameTest.unsigned short.Unix.Compatible.xml | 30 + ...ypeNameTest.unsigned short.Unix.Default.cs | 40 + ...peNameTest.unsigned short.Unix.Default.xml | 30 + ...TypeNameTest.unsigned short.Unix.Latest.cs | 40 + ...ypeNameTest.unsigned short.Unix.Latest.xml | 30 + ...ypeNameTest.unsigned short.Unix.Preview.cs | 40 + ...peNameTest.unsigned short.Unix.Preview.xml | 30 + ...eTest.unsigned short.Windows.Compatible.cs | 40 + ...Test.unsigned short.Windows.Compatible.xml | 30 + ...NameTest.unsigned short.Windows.Default.cs | 40 + ...ameTest.unsigned short.Windows.Default.xml | 30 + ...eNameTest.unsigned short.Windows.Latest.cs | 40 + ...NameTest.unsigned short.Windows.Latest.xml | 30 + ...NameTest.unsigned short.Windows.Preview.cs | 40 + ...ameTest.unsigned short.Windows.Preview.xml | 30 + ...tionTest.NewKeywordTest.Unix.Compatible.cs | 29 + ...ionTest.NewKeywordTest.Unix.Compatible.xml | 28 + ...arationTest.NewKeywordTest.Unix.Default.cs | 29 + ...rationTest.NewKeywordTest.Unix.Default.xml | 28 + ...larationTest.NewKeywordTest.Unix.Latest.cs | 29 + ...arationTest.NewKeywordTest.Unix.Latest.xml | 28 + ...arationTest.NewKeywordTest.Unix.Preview.cs | 29 + ...rationTest.NewKeywordTest.Unix.Preview.xml | 28 + ...nTest.NewKeywordTest.Windows.Compatible.cs | 29 + ...Test.NewKeywordTest.Windows.Compatible.xml | 28 + ...tionTest.NewKeywordTest.Windows.Default.cs | 29 + ...ionTest.NewKeywordTest.Windows.Default.xml | 28 + ...ationTest.NewKeywordTest.Windows.Latest.cs | 29 + ...tionTest.NewKeywordTest.Windows.Latest.xml | 28 + ...tionTest.NewKeywordTest.Windows.Preview.cs | 29 + ...ionTest.NewKeywordTest.Windows.Preview.xml | 28 + ...onTest.NoDefinitionTest.Unix.Compatible.cs | 9 + ...nTest.NoDefinitionTest.Unix.Compatible.xml | 6 + ...ationTest.NoDefinitionTest.Unix.Default.cs | 9 + ...tionTest.NoDefinitionTest.Unix.Default.xml | 6 + ...rationTest.NoDefinitionTest.Unix.Latest.cs | 9 + ...ationTest.NoDefinitionTest.Unix.Latest.xml | 6 + ...ationTest.NoDefinitionTest.Unix.Preview.cs | 9 + ...tionTest.NoDefinitionTest.Unix.Preview.xml | 6 + ...est.NoDefinitionTest.Windows.Compatible.cs | 9 + ...st.NoDefinitionTest.Windows.Compatible.xml | 6 + ...onTest.NoDefinitionTest.Windows.Default.cs | 9 + ...nTest.NoDefinitionTest.Windows.Default.xml | 6 + ...ionTest.NoDefinitionTest.Windows.Latest.cs | 9 + ...onTest.NoDefinitionTest.Windows.Latest.xml | 6 + ...onTest.NoDefinitionTest.Windows.Preview.cs | 9 + ...nTest.NoDefinitionTest.Windows.Preview.xml | 6 + ...nTest.PointerToSelfTest.Unix.Compatible.cs | 14 + ...Test.PointerToSelfTest.Unix.Compatible.xml | 13 + ...tionTest.PointerToSelfTest.Unix.Default.cs | 14 + ...ionTest.PointerToSelfTest.Unix.Default.xml | 13 + ...ationTest.PointerToSelfTest.Unix.Latest.cs | 14 + ...tionTest.PointerToSelfTest.Unix.Latest.xml | 13 + ...tionTest.PointerToSelfTest.Unix.Preview.cs | 14 + ...ionTest.PointerToSelfTest.Unix.Preview.xml | 13 + ...st.PointerToSelfTest.Windows.Compatible.cs | 14 + ...t.PointerToSelfTest.Windows.Compatible.xml | 13 + ...nTest.PointerToSelfTest.Windows.Default.cs | 14 + ...Test.PointerToSelfTest.Windows.Default.xml | 13 + ...onTest.PointerToSelfTest.Windows.Latest.cs | 14 + ...nTest.PointerToSelfTest.Windows.Latest.xml | 13 + ...nTest.PointerToSelfTest.Windows.Preview.cs | 14 + ...Test.PointerToSelfTest.Windows.Preview.xml | 13 + ...terToSelfViaTypedefTest.Unix.Compatible.cs | 15 + ...erToSelfViaTypedefTest.Unix.Compatible.xml | 13 + ...ointerToSelfViaTypedefTest.Unix.Default.cs | 15 + ...interToSelfViaTypedefTest.Unix.Default.xml | 13 + ...PointerToSelfViaTypedefTest.Unix.Latest.cs | 15 + ...ointerToSelfViaTypedefTest.Unix.Latest.xml | 13 + ...ointerToSelfViaTypedefTest.Unix.Preview.cs | 15 + ...interToSelfViaTypedefTest.Unix.Preview.xml | 13 + ...ToSelfViaTypedefTest.Windows.Compatible.cs | 15 + ...oSelfViaTypedefTest.Windows.Compatible.xml | 13 + ...terToSelfViaTypedefTest.Windows.Default.cs | 15 + ...erToSelfViaTypedefTest.Windows.Default.xml | 13 + ...nterToSelfViaTypedefTest.Windows.Latest.cs | 15 + ...terToSelfViaTypedefTest.Windows.Latest.xml | 13 + ...terToSelfViaTypedefTest.Windows.Preview.cs | 15 + ...erToSelfViaTypedefTest.Windows.Preview.xml | 13 + ...emapNestedAnonymousTest.Unix.Compatible.cs | 39 + ...mapNestedAnonymousTest.Unix.Compatible.xml | 33 + ...t.RemapNestedAnonymousTest.Unix.Default.cs | 36 + ....RemapNestedAnonymousTest.Unix.Default.xml | 30 + ...st.RemapNestedAnonymousTest.Unix.Latest.cs | 38 + ...t.RemapNestedAnonymousTest.Unix.Latest.xml | 30 + ...t.RemapNestedAnonymousTest.Unix.Preview.cs | 38 + ....RemapNestedAnonymousTest.Unix.Preview.xml | 30 + ...pNestedAnonymousTest.Windows.Compatible.cs | 39 + ...NestedAnonymousTest.Windows.Compatible.xml | 33 + ...emapNestedAnonymousTest.Windows.Default.cs | 36 + ...mapNestedAnonymousTest.Windows.Default.xml | 30 + ...RemapNestedAnonymousTest.Windows.Latest.cs | 38 + ...emapNestedAnonymousTest.Windows.Latest.xml | 30 + ...emapNestedAnonymousTest.Windows.Preview.cs | 38 + ...mapNestedAnonymousTest.Windows.Preview.xml | 30 + ...clarationTest.RemapTest.Unix.Compatible.cs | 9 + ...larationTest.RemapTest.Unix.Compatible.xml | 6 + ...nDeclarationTest.RemapTest.Unix.Default.cs | 9 + ...DeclarationTest.RemapTest.Unix.Default.xml | 6 + ...onDeclarationTest.RemapTest.Unix.Latest.cs | 9 + ...nDeclarationTest.RemapTest.Unix.Latest.xml | 6 + ...nDeclarationTest.RemapTest.Unix.Preview.cs | 9 + ...DeclarationTest.RemapTest.Unix.Preview.xml | 6 + ...rationTest.RemapTest.Windows.Compatible.cs | 9 + ...ationTest.RemapTest.Windows.Compatible.xml | 6 + ...clarationTest.RemapTest.Windows.Default.cs | 9 + ...larationTest.RemapTest.Windows.Default.xml | 6 + ...eclarationTest.RemapTest.Windows.Latest.cs | 9 + ...clarationTest.RemapTest.Windows.Latest.xml | 6 + ...clarationTest.RemapTest.Windows.Preview.cs | 9 + ...larationTest.RemapTest.Windows.Preview.xml | 6 + ...onDefinitionPointerTest.Unix.Compatible.cs | 9 + ...nDefinitionPointerTest.Unix.Compatible.xml | 6 + ...ipNonDefinitionPointerTest.Unix.Default.cs | 9 + ...pNonDefinitionPointerTest.Unix.Default.xml | 6 + ...kipNonDefinitionPointerTest.Unix.Latest.cs | 9 + ...ipNonDefinitionPointerTest.Unix.Latest.xml | 6 + ...ipNonDefinitionPointerTest.Unix.Preview.cs | 9 + ...pNonDefinitionPointerTest.Unix.Preview.xml | 6 + ...efinitionPointerTest.Windows.Compatible.cs | 9 + ...finitionPointerTest.Windows.Compatible.xml | 6 + ...onDefinitionPointerTest.Windows.Default.cs | 9 + ...nDefinitionPointerTest.Windows.Default.xml | 6 + ...NonDefinitionPointerTest.Windows.Latest.cs | 9 + ...onDefinitionPointerTest.Windows.Latest.xml | 6 + ...onDefinitionPointerTest.Windows.Preview.cs | 9 + ...nDefinitionPointerTest.Windows.Preview.xml | 6 + ...onDefinitionTest.double.Unix.Compatible.cs | 17 + ...nDefinitionTest.double.Unix.Compatible.xml | 16 + ...ipNonDefinitionTest.double.Unix.Default.cs | 17 + ...pNonDefinitionTest.double.Unix.Default.xml | 16 + ...kipNonDefinitionTest.double.Unix.Latest.cs | 17 + ...ipNonDefinitionTest.double.Unix.Latest.xml | 16 + ...ipNonDefinitionTest.double.Unix.Preview.cs | 17 + ...pNonDefinitionTest.double.Unix.Preview.xml | 16 + ...efinitionTest.double.Windows.Compatible.cs | 17 + ...finitionTest.double.Windows.Compatible.xml | 16 + ...onDefinitionTest.double.Windows.Default.cs | 17 + ...nDefinitionTest.double.Windows.Default.xml | 16 + ...NonDefinitionTest.double.Windows.Latest.cs | 17 + ...onDefinitionTest.double.Windows.Latest.xml | 16 + ...onDefinitionTest.double.Windows.Preview.cs | 17 + ...nDefinitionTest.double.Windows.Preview.xml | 16 + ...NonDefinitionTest.float.Unix.Compatible.cs | 17 + ...onDefinitionTest.float.Unix.Compatible.xml | 16 + ...kipNonDefinitionTest.float.Unix.Default.cs | 17 + ...ipNonDefinitionTest.float.Unix.Default.xml | 16 + ...SkipNonDefinitionTest.float.Unix.Latest.cs | 17 + ...kipNonDefinitionTest.float.Unix.Latest.xml | 16 + ...kipNonDefinitionTest.float.Unix.Preview.cs | 17 + ...ipNonDefinitionTest.float.Unix.Preview.xml | 16 + ...DefinitionTest.float.Windows.Compatible.cs | 17 + ...efinitionTest.float.Windows.Compatible.xml | 16 + ...NonDefinitionTest.float.Windows.Default.cs | 17 + ...onDefinitionTest.float.Windows.Default.xml | 16 + ...pNonDefinitionTest.float.Windows.Latest.cs | 17 + ...NonDefinitionTest.float.Windows.Latest.xml | 16 + ...NonDefinitionTest.float.Windows.Preview.cs | 17 + ...onDefinitionTest.float.Windows.Preview.xml | 16 + ...ipNonDefinitionTest.int.Unix.Compatible.cs | 17 + ...pNonDefinitionTest.int.Unix.Compatible.xml | 16 + ....SkipNonDefinitionTest.int.Unix.Default.cs | 17 + ...SkipNonDefinitionTest.int.Unix.Default.xml | 16 + ...t.SkipNonDefinitionTest.int.Unix.Latest.cs | 17 + ....SkipNonDefinitionTest.int.Unix.Latest.xml | 16 + ....SkipNonDefinitionTest.int.Unix.Preview.cs | 17 + ...SkipNonDefinitionTest.int.Unix.Preview.xml | 16 + ...onDefinitionTest.int.Windows.Compatible.cs | 17 + ...nDefinitionTest.int.Windows.Compatible.xml | 16 + ...ipNonDefinitionTest.int.Windows.Default.cs | 17 + ...pNonDefinitionTest.int.Windows.Default.xml | 16 + ...kipNonDefinitionTest.int.Windows.Latest.cs | 17 + ...ipNonDefinitionTest.int.Windows.Latest.xml | 16 + ...ipNonDefinitionTest.int.Windows.Preview.cs | 17 + ...pNonDefinitionTest.int.Windows.Preview.xml | 16 + ...NonDefinitionTest.short.Unix.Compatible.cs | 17 + ...onDefinitionTest.short.Unix.Compatible.xml | 16 + ...kipNonDefinitionTest.short.Unix.Default.cs | 17 + ...ipNonDefinitionTest.short.Unix.Default.xml | 16 + ...SkipNonDefinitionTest.short.Unix.Latest.cs | 17 + ...kipNonDefinitionTest.short.Unix.Latest.xml | 16 + ...kipNonDefinitionTest.short.Unix.Preview.cs | 17 + ...ipNonDefinitionTest.short.Unix.Preview.xml | 16 + ...DefinitionTest.short.Windows.Compatible.cs | 17 + ...efinitionTest.short.Windows.Compatible.xml | 16 + ...NonDefinitionTest.short.Windows.Default.cs | 17 + ...onDefinitionTest.short.Windows.Default.xml | 16 + ...pNonDefinitionTest.short.Windows.Latest.cs | 17 + ...NonDefinitionTest.short.Windows.Latest.xml | 16 + ...NonDefinitionTest.short.Windows.Preview.cs | 17 + ...onDefinitionTest.short.Windows.Preview.xml | 16 + ...NativeTypeNameTest.bool.Unix.Compatible.cs | 20 + ...ativeTypeNameTest.bool.Unix.Compatible.xml | 16 + ...ithNativeTypeNameTest.bool.Unix.Default.cs | 20 + ...thNativeTypeNameTest.bool.Unix.Default.xml | 16 + ...WithNativeTypeNameTest.bool.Unix.Latest.cs | 20 + ...ithNativeTypeNameTest.bool.Unix.Latest.xml | 16 + ...ithNativeTypeNameTest.bool.Unix.Preview.cs | 20 + ...thNativeTypeNameTest.bool.Unix.Preview.xml | 16 + ...iveTypeNameTest.bool.Windows.Compatible.cs | 20 + ...veTypeNameTest.bool.Windows.Compatible.xml | 16 + ...NativeTypeNameTest.bool.Windows.Default.cs | 20 + ...ativeTypeNameTest.bool.Windows.Default.xml | 16 + ...hNativeTypeNameTest.bool.Windows.Latest.cs | 20 + ...NativeTypeNameTest.bool.Windows.Latest.xml | 16 + ...NativeTypeNameTest.bool.Windows.Preview.cs | 20 + ...ativeTypeNameTest.bool.Windows.Preview.xml | 16 + ...eTypeNameTest.long long.Unix.Compatible.cs | 20 + ...TypeNameTest.long long.Unix.Compatible.xml | 16 + ...tiveTypeNameTest.long long.Unix.Default.cs | 20 + ...iveTypeNameTest.long long.Unix.Default.xml | 16 + ...ativeTypeNameTest.long long.Unix.Latest.cs | 20 + ...tiveTypeNameTest.long long.Unix.Latest.xml | 16 + ...tiveTypeNameTest.long long.Unix.Preview.cs | 20 + ...iveTypeNameTest.long long.Unix.Preview.xml | 16 + ...peNameTest.long long.Windows.Compatible.cs | 20 + ...eNameTest.long long.Windows.Compatible.xml | 16 + ...eTypeNameTest.long long.Windows.Default.cs | 20 + ...TypeNameTest.long long.Windows.Default.xml | 16 + ...veTypeNameTest.long long.Windows.Latest.cs | 20 + ...eTypeNameTest.long long.Windows.Latest.xml | 16 + ...eTypeNameTest.long long.Windows.Preview.cs | 20 + ...TypeNameTest.long long.Windows.Preview.xml | 16 + ...ypeNameTest.signed char.Unix.Compatible.cs | 20 + ...peNameTest.signed char.Unix.Compatible.xml | 16 + ...veTypeNameTest.signed char.Unix.Default.cs | 20 + ...eTypeNameTest.signed char.Unix.Default.xml | 16 + ...iveTypeNameTest.signed char.Unix.Latest.cs | 20 + ...veTypeNameTest.signed char.Unix.Latest.xml | 16 + ...veTypeNameTest.signed char.Unix.Preview.cs | 20 + ...eTypeNameTest.signed char.Unix.Preview.xml | 16 + ...NameTest.signed char.Windows.Compatible.cs | 20 + ...ameTest.signed char.Windows.Compatible.xml | 16 + ...ypeNameTest.signed char.Windows.Default.cs | 20 + ...peNameTest.signed char.Windows.Default.xml | 16 + ...TypeNameTest.signed char.Windows.Latest.cs | 20 + ...ypeNameTest.signed char.Windows.Latest.xml | 16 + ...ypeNameTest.signed char.Windows.Preview.cs | 20 + ...peNameTest.signed char.Windows.Preview.xml | 16 + ...eNameTest.unsigned char.Unix.Compatible.cs | 20 + ...NameTest.unsigned char.Unix.Compatible.xml | 16 + ...TypeNameTest.unsigned char.Unix.Default.cs | 20 + ...ypeNameTest.unsigned char.Unix.Default.xml | 16 + ...eTypeNameTest.unsigned char.Unix.Latest.cs | 20 + ...TypeNameTest.unsigned char.Unix.Latest.xml | 16 + ...TypeNameTest.unsigned char.Unix.Preview.cs | 20 + ...ypeNameTest.unsigned char.Unix.Preview.xml | 16 + ...meTest.unsigned char.Windows.Compatible.cs | 20 + ...eTest.unsigned char.Windows.Compatible.xml | 16 + ...eNameTest.unsigned char.Windows.Default.cs | 20 + ...NameTest.unsigned char.Windows.Default.xml | 16 + ...peNameTest.unsigned char.Windows.Latest.cs | 20 + ...eNameTest.unsigned char.Windows.Latest.xml | 16 + ...eNameTest.unsigned char.Windows.Preview.cs | 20 + ...NameTest.unsigned char.Windows.Preview.xml | 16 + ...peNameTest.unsigned int.Unix.Compatible.cs | 20 + ...eNameTest.unsigned int.Unix.Compatible.xml | 16 + ...eTypeNameTest.unsigned int.Unix.Default.cs | 20 + ...TypeNameTest.unsigned int.Unix.Default.xml | 16 + ...veTypeNameTest.unsigned int.Unix.Latest.cs | 20 + ...eTypeNameTest.unsigned int.Unix.Latest.xml | 16 + ...eTypeNameTest.unsigned int.Unix.Preview.cs | 20 + ...TypeNameTest.unsigned int.Unix.Preview.xml | 16 + ...ameTest.unsigned int.Windows.Compatible.cs | 20 + ...meTest.unsigned int.Windows.Compatible.xml | 16 + ...peNameTest.unsigned int.Windows.Default.cs | 20 + ...eNameTest.unsigned int.Windows.Default.xml | 16 + ...ypeNameTest.unsigned int.Windows.Latest.cs | 20 + ...peNameTest.unsigned int.Windows.Latest.xml | 16 + ...peNameTest.unsigned int.Windows.Preview.cs | 20 + ...eNameTest.unsigned int.Windows.Preview.xml | 16 + ...Test.unsigned long long.Unix.Compatible.cs | 20 + ...est.unsigned long long.Unix.Compatible.xml | 16 + ...ameTest.unsigned long long.Unix.Default.cs | 20 + ...meTest.unsigned long long.Unix.Default.xml | 16 + ...NameTest.unsigned long long.Unix.Latest.cs | 20 + ...ameTest.unsigned long long.Unix.Latest.xml | 16 + ...ameTest.unsigned long long.Unix.Preview.cs | 20 + ...meTest.unsigned long long.Unix.Preview.xml | 16 + ...t.unsigned long long.Windows.Compatible.cs | 20 + ....unsigned long long.Windows.Compatible.xml | 16 + ...Test.unsigned long long.Windows.Default.cs | 20 + ...est.unsigned long long.Windows.Default.xml | 16 + ...eTest.unsigned long long.Windows.Latest.cs | 20 + ...Test.unsigned long long.Windows.Latest.xml | 16 + ...Test.unsigned long long.Windows.Preview.cs | 20 + ...est.unsigned long long.Windows.Preview.xml | 16 + ...NameTest.unsigned short.Unix.Compatible.cs | 20 + ...ameTest.unsigned short.Unix.Compatible.xml | 16 + ...ypeNameTest.unsigned short.Unix.Default.cs | 20 + ...peNameTest.unsigned short.Unix.Default.xml | 16 + ...TypeNameTest.unsigned short.Unix.Latest.cs | 20 + ...ypeNameTest.unsigned short.Unix.Latest.xml | 16 + ...ypeNameTest.unsigned short.Unix.Preview.cs | 20 + ...peNameTest.unsigned short.Unix.Preview.xml | 16 + ...eTest.unsigned short.Windows.Compatible.cs | 20 + ...Test.unsigned short.Windows.Compatible.xml | 16 + ...NameTest.unsigned short.Windows.Default.cs | 20 + ...ameTest.unsigned short.Windows.Default.xml | 16 + ...eNameTest.unsigned short.Windows.Latest.cs | 20 + ...NameTest.unsigned short.Windows.Latest.xml | 16 + ...NameTest.unsigned short.Windows.Preview.cs | 20 + ...ameTest.unsigned short.Windows.Preview.xml | 16 + ...onTest.TypedefTest.bool.Unix.Compatible.cs | 20 + ...nTest.TypedefTest.bool.Unix.Compatible.xml | 16 + ...ationTest.TypedefTest.bool.Unix.Default.cs | 20 + ...tionTest.TypedefTest.bool.Unix.Default.xml | 16 + ...rationTest.TypedefTest.bool.Unix.Latest.cs | 20 + ...ationTest.TypedefTest.bool.Unix.Latest.xml | 16 + ...ationTest.TypedefTest.bool.Unix.Preview.cs | 20 + ...tionTest.TypedefTest.bool.Unix.Preview.xml | 16 + ...est.TypedefTest.bool.Windows.Compatible.cs | 20 + ...st.TypedefTest.bool.Windows.Compatible.xml | 16 + ...onTest.TypedefTest.bool.Windows.Default.cs | 20 + ...nTest.TypedefTest.bool.Windows.Default.xml | 16 + ...ionTest.TypedefTest.bool.Windows.Latest.cs | 20 + ...onTest.TypedefTest.bool.Windows.Latest.xml | 16 + ...onTest.TypedefTest.bool.Windows.Preview.cs | 20 + ...nTest.TypedefTest.bool.Windows.Preview.xml | 16 + ...Test.TypedefTest.double.Unix.Compatible.cs | 20 + ...est.TypedefTest.double.Unix.Compatible.xml | 16 + ...ionTest.TypedefTest.double.Unix.Default.cs | 20 + ...onTest.TypedefTest.double.Unix.Default.xml | 16 + ...tionTest.TypedefTest.double.Unix.Latest.cs | 20 + ...ionTest.TypedefTest.double.Unix.Latest.xml | 16 + ...ionTest.TypedefTest.double.Unix.Preview.cs | 20 + ...onTest.TypedefTest.double.Unix.Preview.xml | 16 + ...t.TypedefTest.double.Windows.Compatible.cs | 20 + ....TypedefTest.double.Windows.Compatible.xml | 16 + ...Test.TypedefTest.double.Windows.Default.cs | 20 + ...est.TypedefTest.double.Windows.Default.xml | 16 + ...nTest.TypedefTest.double.Windows.Latest.cs | 20 + ...Test.TypedefTest.double.Windows.Latest.xml | 16 + ...Test.TypedefTest.double.Windows.Preview.cs | 20 + ...est.TypedefTest.double.Windows.Preview.xml | 16 + ...nTest.TypedefTest.float.Unix.Compatible.cs | 20 + ...Test.TypedefTest.float.Unix.Compatible.xml | 16 + ...tionTest.TypedefTest.float.Unix.Default.cs | 20 + ...ionTest.TypedefTest.float.Unix.Default.xml | 16 + ...ationTest.TypedefTest.float.Unix.Latest.cs | 20 + ...tionTest.TypedefTest.float.Unix.Latest.xml | 16 + ...tionTest.TypedefTest.float.Unix.Preview.cs | 20 + ...ionTest.TypedefTest.float.Unix.Preview.xml | 16 + ...st.TypedefTest.float.Windows.Compatible.cs | 20 + ...t.TypedefTest.float.Windows.Compatible.xml | 16 + ...nTest.TypedefTest.float.Windows.Default.cs | 20 + ...Test.TypedefTest.float.Windows.Default.xml | 16 + ...onTest.TypedefTest.float.Windows.Latest.cs | 20 + ...nTest.TypedefTest.float.Windows.Latest.xml | 16 + ...nTest.TypedefTest.float.Windows.Preview.cs | 20 + ...Test.TypedefTest.float.Windows.Preview.xml | 16 + ...ionTest.TypedefTest.int.Unix.Compatible.cs | 20 + ...onTest.TypedefTest.int.Unix.Compatible.xml | 16 + ...rationTest.TypedefTest.int.Unix.Default.cs | 20 + ...ationTest.TypedefTest.int.Unix.Default.xml | 16 + ...arationTest.TypedefTest.int.Unix.Latest.cs | 20 + ...rationTest.TypedefTest.int.Unix.Latest.xml | 16 + ...rationTest.TypedefTest.int.Unix.Preview.cs | 20 + ...ationTest.TypedefTest.int.Unix.Preview.xml | 16 + ...Test.TypedefTest.int.Windows.Compatible.cs | 20 + ...est.TypedefTest.int.Windows.Compatible.xml | 16 + ...ionTest.TypedefTest.int.Windows.Default.cs | 20 + ...onTest.TypedefTest.int.Windows.Default.xml | 16 + ...tionTest.TypedefTest.int.Windows.Latest.cs | 20 + ...ionTest.TypedefTest.int.Windows.Latest.xml | 16 + ...ionTest.TypedefTest.int.Windows.Preview.cs | 20 + ...onTest.TypedefTest.int.Windows.Preview.xml | 16 + ...t.TypedefTest.long long.Unix.Compatible.cs | 20 + ....TypedefTest.long long.Unix.Compatible.xml | 16 + ...Test.TypedefTest.long long.Unix.Default.cs | 20 + ...est.TypedefTest.long long.Unix.Default.xml | 16 + ...nTest.TypedefTest.long long.Unix.Latest.cs | 20 + ...Test.TypedefTest.long long.Unix.Latest.xml | 16 + ...Test.TypedefTest.long long.Unix.Preview.cs | 20 + ...est.TypedefTest.long long.Unix.Preview.xml | 16 + ...ypedefTest.long long.Windows.Compatible.cs | 20 + ...pedefTest.long long.Windows.Compatible.xml | 16 + ...t.TypedefTest.long long.Windows.Default.cs | 20 + ....TypedefTest.long long.Windows.Default.xml | 16 + ...st.TypedefTest.long long.Windows.Latest.cs | 20 + ...t.TypedefTest.long long.Windows.Latest.xml | 16 + ...t.TypedefTest.long long.Windows.Preview.cs | 20 + ....TypedefTest.long long.Windows.Preview.xml | 16 + ...nTest.TypedefTest.short.Unix.Compatible.cs | 20 + ...Test.TypedefTest.short.Unix.Compatible.xml | 16 + ...tionTest.TypedefTest.short.Unix.Default.cs | 20 + ...ionTest.TypedefTest.short.Unix.Default.xml | 16 + ...ationTest.TypedefTest.short.Unix.Latest.cs | 20 + ...tionTest.TypedefTest.short.Unix.Latest.xml | 16 + ...tionTest.TypedefTest.short.Unix.Preview.cs | 20 + ...ionTest.TypedefTest.short.Unix.Preview.xml | 16 + ...st.TypedefTest.short.Windows.Compatible.cs | 20 + ...t.TypedefTest.short.Windows.Compatible.xml | 16 + ...nTest.TypedefTest.short.Windows.Default.cs | 20 + ...Test.TypedefTest.short.Windows.Default.xml | 16 + ...onTest.TypedefTest.short.Windows.Latest.cs | 20 + ...nTest.TypedefTest.short.Windows.Latest.xml | 16 + ...nTest.TypedefTest.short.Windows.Preview.cs | 20 + ...Test.TypedefTest.short.Windows.Preview.xml | 16 + ...TypedefTest.signed char.Unix.Compatible.cs | 20 + ...ypedefTest.signed char.Unix.Compatible.xml | 16 + ...st.TypedefTest.signed char.Unix.Default.cs | 20 + ...t.TypedefTest.signed char.Unix.Default.xml | 16 + ...est.TypedefTest.signed char.Unix.Latest.cs | 20 + ...st.TypedefTest.signed char.Unix.Latest.xml | 16 + ...st.TypedefTest.signed char.Unix.Preview.cs | 20 + ...t.TypedefTest.signed char.Unix.Preview.xml | 16 + ...edefTest.signed char.Windows.Compatible.cs | 20 + ...defTest.signed char.Windows.Compatible.xml | 16 + ...TypedefTest.signed char.Windows.Default.cs | 20 + ...ypedefTest.signed char.Windows.Default.xml | 16 + ....TypedefTest.signed char.Windows.Latest.cs | 20 + ...TypedefTest.signed char.Windows.Latest.xml | 16 + ...TypedefTest.signed char.Windows.Preview.cs | 20 + ...ypedefTest.signed char.Windows.Preview.xml | 16 + ...pedefTest.unsigned char.Unix.Compatible.cs | 20 + ...edefTest.unsigned char.Unix.Compatible.xml | 16 + ....TypedefTest.unsigned char.Unix.Default.cs | 20 + ...TypedefTest.unsigned char.Unix.Default.xml | 16 + ...t.TypedefTest.unsigned char.Unix.Latest.cs | 20 + ....TypedefTest.unsigned char.Unix.Latest.xml | 16 + ....TypedefTest.unsigned char.Unix.Preview.cs | 20 + ...TypedefTest.unsigned char.Unix.Preview.xml | 16 + ...efTest.unsigned char.Windows.Compatible.cs | 20 + ...fTest.unsigned char.Windows.Compatible.xml | 16 + ...pedefTest.unsigned char.Windows.Default.cs | 20 + ...edefTest.unsigned char.Windows.Default.xml | 16 + ...ypedefTest.unsigned char.Windows.Latest.cs | 20 + ...pedefTest.unsigned char.Windows.Latest.xml | 16 + ...pedefTest.unsigned char.Windows.Preview.cs | 20 + ...edefTest.unsigned char.Windows.Preview.xml | 16 + ...ypedefTest.unsigned int.Unix.Compatible.cs | 20 + ...pedefTest.unsigned int.Unix.Compatible.xml | 16 + ...t.TypedefTest.unsigned int.Unix.Default.cs | 20 + ....TypedefTest.unsigned int.Unix.Default.xml | 16 + ...st.TypedefTest.unsigned int.Unix.Latest.cs | 20 + ...t.TypedefTest.unsigned int.Unix.Latest.xml | 16 + ...t.TypedefTest.unsigned int.Unix.Preview.cs | 20 + ....TypedefTest.unsigned int.Unix.Preview.xml | 16 + ...defTest.unsigned int.Windows.Compatible.cs | 20 + ...efTest.unsigned int.Windows.Compatible.xml | 16 + ...ypedefTest.unsigned int.Windows.Default.cs | 20 + ...pedefTest.unsigned int.Windows.Default.xml | 16 + ...TypedefTest.unsigned int.Windows.Latest.cs | 20 + ...ypedefTest.unsigned int.Windows.Latest.xml | 16 + ...ypedefTest.unsigned int.Windows.Preview.cs | 20 + ...pedefTest.unsigned int.Windows.Preview.xml | 16 + ...Test.unsigned long long.Unix.Compatible.cs | 20 + ...est.unsigned long long.Unix.Compatible.xml | 16 + ...defTest.unsigned long long.Unix.Default.cs | 20 + ...efTest.unsigned long long.Unix.Default.xml | 16 + ...edefTest.unsigned long long.Unix.Latest.cs | 20 + ...defTest.unsigned long long.Unix.Latest.xml | 16 + ...defTest.unsigned long long.Unix.Preview.cs | 20 + ...efTest.unsigned long long.Unix.Preview.xml | 16 + ...t.unsigned long long.Windows.Compatible.cs | 20 + ....unsigned long long.Windows.Compatible.xml | 16 + ...Test.unsigned long long.Windows.Default.cs | 20 + ...est.unsigned long long.Windows.Default.xml | 16 + ...fTest.unsigned long long.Windows.Latest.cs | 20 + ...Test.unsigned long long.Windows.Latest.xml | 16 + ...Test.unsigned long long.Windows.Preview.cs | 20 + ...est.unsigned long long.Windows.Preview.xml | 16 + ...edefTest.unsigned short.Unix.Compatible.cs | 20 + ...defTest.unsigned short.Unix.Compatible.xml | 16 + ...TypedefTest.unsigned short.Unix.Default.cs | 20 + ...ypedefTest.unsigned short.Unix.Default.xml | 16 + ....TypedefTest.unsigned short.Unix.Latest.cs | 20 + ...TypedefTest.unsigned short.Unix.Latest.xml | 16 + ...TypedefTest.unsigned short.Unix.Preview.cs | 20 + ...ypedefTest.unsigned short.Unix.Preview.xml | 16 + ...fTest.unsigned short.Windows.Compatible.cs | 20 + ...Test.unsigned short.Windows.Compatible.xml | 16 + ...edefTest.unsigned short.Windows.Default.cs | 20 + ...defTest.unsigned short.Windows.Default.xml | 16 + ...pedefTest.unsigned short.Windows.Latest.cs | 20 + ...edefTest.unsigned short.Windows.Latest.xml | 16 + ...edefTest.unsigned short.Windows.Preview.cs | 20 + ...defTest.unsigned short.Windows.Preview.xml | 16 + ...AnonStructWithAnonUnion.Unix.Compatible.cs | 82 + ...nonStructWithAnonUnion.Unix.Compatible.xml | 66 + ...ithAnonStructWithAnonUnion.Unix.Default.cs | 73 + ...thAnonStructWithAnonUnion.Unix.Default.xml | 57 + ...WithAnonStructWithAnonUnion.Unix.Latest.cs | 84 + ...ithAnonStructWithAnonUnion.Unix.Latest.xml | 63 + ...ithAnonStructWithAnonUnion.Unix.Preview.cs | 84 + ...thAnonStructWithAnonUnion.Unix.Preview.xml | 63 + ...nStructWithAnonUnion.Windows.Compatible.cs | 82 + ...StructWithAnonUnion.Windows.Compatible.xml | 66 + ...AnonStructWithAnonUnion.Windows.Default.cs | 73 + ...nonStructWithAnonUnion.Windows.Default.xml | 57 + ...hAnonStructWithAnonUnion.Windows.Latest.cs | 84 + ...AnonStructWithAnonUnion.Windows.Latest.xml | 63 + ...AnonStructWithAnonUnion.Windows.Preview.cs | 84 + ...nonStructWithAnonUnion.Windows.Preview.xml | 63 + ...onTest.BasicTest.double.Unix.Compatible.cs | 7 + ...nTest.BasicTest.double.Unix.Compatible.xml | 13 + ...ationTest.BasicTest.double.Unix.Default.cs | 7 + ...tionTest.BasicTest.double.Unix.Default.xml | 13 + ...rationTest.BasicTest.double.Unix.Latest.cs | 7 + ...ationTest.BasicTest.double.Unix.Latest.xml | 13 + ...ationTest.BasicTest.double.Unix.Preview.cs | 7 + ...tionTest.BasicTest.double.Unix.Preview.xml | 13 + ...est.BasicTest.double.Windows.Compatible.cs | 7 + ...st.BasicTest.double.Windows.Compatible.xml | 13 + ...onTest.BasicTest.double.Windows.Default.cs | 7 + ...nTest.BasicTest.double.Windows.Default.xml | 13 + ...ionTest.BasicTest.double.Windows.Latest.cs | 7 + ...onTest.BasicTest.double.Windows.Latest.xml | 13 + ...onTest.BasicTest.double.Windows.Preview.cs | 7 + ...nTest.BasicTest.double.Windows.Preview.xml | 13 + ...ionTest.BasicTest.float.Unix.Compatible.cs | 7 + ...onTest.BasicTest.float.Unix.Compatible.xml | 13 + ...rationTest.BasicTest.float.Unix.Default.cs | 7 + ...ationTest.BasicTest.float.Unix.Default.xml | 13 + ...arationTest.BasicTest.float.Unix.Latest.cs | 7 + ...rationTest.BasicTest.float.Unix.Latest.xml | 13 + ...rationTest.BasicTest.float.Unix.Preview.cs | 7 + ...ationTest.BasicTest.float.Unix.Preview.xml | 13 + ...Test.BasicTest.float.Windows.Compatible.cs | 7 + ...est.BasicTest.float.Windows.Compatible.xml | 13 + ...ionTest.BasicTest.float.Windows.Default.cs | 7 + ...onTest.BasicTest.float.Windows.Default.xml | 13 + ...tionTest.BasicTest.float.Windows.Latest.cs | 7 + ...ionTest.BasicTest.float.Windows.Latest.xml | 13 + ...ionTest.BasicTest.float.Windows.Preview.cs | 7 + ...onTest.BasicTest.float.Windows.Preview.xml | 13 + ...ationTest.BasicTest.int.Unix.Compatible.cs | 7 + ...tionTest.BasicTest.int.Unix.Compatible.xml | 13 + ...larationTest.BasicTest.int.Unix.Default.cs | 7 + ...arationTest.BasicTest.int.Unix.Default.xml | 13 + ...clarationTest.BasicTest.int.Unix.Latest.cs | 7 + ...larationTest.BasicTest.int.Unix.Latest.xml | 13 + ...larationTest.BasicTest.int.Unix.Preview.cs | 7 + ...arationTest.BasicTest.int.Unix.Preview.xml | 13 + ...onTest.BasicTest.int.Windows.Compatible.cs | 7 + ...nTest.BasicTest.int.Windows.Compatible.xml | 13 + ...ationTest.BasicTest.int.Windows.Default.cs | 7 + ...tionTest.BasicTest.int.Windows.Default.xml | 13 + ...rationTest.BasicTest.int.Windows.Latest.cs | 7 + ...ationTest.BasicTest.int.Windows.Latest.xml | 13 + ...ationTest.BasicTest.int.Windows.Preview.cs | 7 + ...tionTest.BasicTest.int.Windows.Preview.xml | 13 + ...ionTest.BasicTest.short.Unix.Compatible.cs | 7 + ...onTest.BasicTest.short.Unix.Compatible.xml | 13 + ...rationTest.BasicTest.short.Unix.Default.cs | 7 + ...ationTest.BasicTest.short.Unix.Default.xml | 13 + ...arationTest.BasicTest.short.Unix.Latest.cs | 7 + ...rationTest.BasicTest.short.Unix.Latest.xml | 13 + ...rationTest.BasicTest.short.Unix.Preview.cs | 7 + ...ationTest.BasicTest.short.Unix.Preview.xml | 13 + ...Test.BasicTest.short.Windows.Compatible.cs | 7 + ...est.BasicTest.short.Windows.Compatible.xml | 13 + ...ionTest.BasicTest.short.Windows.Default.cs | 7 + ...onTest.BasicTest.short.Windows.Default.xml | 13 + ...tionTest.BasicTest.short.Windows.Latest.cs | 7 + ...ionTest.BasicTest.short.Windows.Latest.xml | 13 + ...ionTest.BasicTest.short.Windows.Preview.cs | 7 + ...onTest.BasicTest.short.Windows.Preview.xml | 13 + ...eTypeNameTest.long long.Unix.Compatible.cs | 8 + ...TypeNameTest.long long.Unix.Compatible.xml | 13 + ...tiveTypeNameTest.long long.Unix.Default.cs | 8 + ...iveTypeNameTest.long long.Unix.Default.xml | 13 + ...ativeTypeNameTest.long long.Unix.Latest.cs | 8 + ...tiveTypeNameTest.long long.Unix.Latest.xml | 13 + ...tiveTypeNameTest.long long.Unix.Preview.cs | 8 + ...iveTypeNameTest.long long.Unix.Preview.xml | 13 + ...peNameTest.long long.Windows.Compatible.cs | 8 + ...eNameTest.long long.Windows.Compatible.xml | 13 + ...eTypeNameTest.long long.Windows.Default.cs | 8 + ...TypeNameTest.long long.Windows.Default.xml | 13 + ...veTypeNameTest.long long.Windows.Latest.cs | 8 + ...eTypeNameTest.long long.Windows.Latest.xml | 13 + ...eTypeNameTest.long long.Windows.Preview.cs | 8 + ...TypeNameTest.long long.Windows.Preview.xml | 13 + ...ypeNameTest.signed char.Unix.Compatible.cs | 8 + ...peNameTest.signed char.Unix.Compatible.xml | 13 + ...veTypeNameTest.signed char.Unix.Default.cs | 8 + ...eTypeNameTest.signed char.Unix.Default.xml | 13 + ...iveTypeNameTest.signed char.Unix.Latest.cs | 8 + ...veTypeNameTest.signed char.Unix.Latest.xml | 13 + ...veTypeNameTest.signed char.Unix.Preview.cs | 8 + ...eTypeNameTest.signed char.Unix.Preview.xml | 13 + ...NameTest.signed char.Windows.Compatible.cs | 8 + ...ameTest.signed char.Windows.Compatible.xml | 13 + ...ypeNameTest.signed char.Windows.Default.cs | 8 + ...peNameTest.signed char.Windows.Default.xml | 13 + ...TypeNameTest.signed char.Windows.Latest.cs | 8 + ...ypeNameTest.signed char.Windows.Latest.xml | 13 + ...ypeNameTest.signed char.Windows.Preview.cs | 8 + ...peNameTest.signed char.Windows.Preview.xml | 13 + ...eNameTest.unsigned char.Unix.Compatible.cs | 8 + ...NameTest.unsigned char.Unix.Compatible.xml | 13 + ...TypeNameTest.unsigned char.Unix.Default.cs | 8 + ...ypeNameTest.unsigned char.Unix.Default.xml | 13 + ...eTypeNameTest.unsigned char.Unix.Latest.cs | 8 + ...TypeNameTest.unsigned char.Unix.Latest.xml | 13 + ...TypeNameTest.unsigned char.Unix.Preview.cs | 8 + ...ypeNameTest.unsigned char.Unix.Preview.xml | 13 + ...meTest.unsigned char.Windows.Compatible.cs | 8 + ...eTest.unsigned char.Windows.Compatible.xml | 13 + ...eNameTest.unsigned char.Windows.Default.cs | 8 + ...NameTest.unsigned char.Windows.Default.xml | 13 + ...peNameTest.unsigned char.Windows.Latest.cs | 8 + ...eNameTest.unsigned char.Windows.Latest.xml | 13 + ...eNameTest.unsigned char.Windows.Preview.cs | 8 + ...NameTest.unsigned char.Windows.Preview.xml | 13 + ...peNameTest.unsigned int.Unix.Compatible.cs | 8 + ...eNameTest.unsigned int.Unix.Compatible.xml | 13 + ...eTypeNameTest.unsigned int.Unix.Default.cs | 8 + ...TypeNameTest.unsigned int.Unix.Default.xml | 13 + ...veTypeNameTest.unsigned int.Unix.Latest.cs | 8 + ...eTypeNameTest.unsigned int.Unix.Latest.xml | 13 + ...eTypeNameTest.unsigned int.Unix.Preview.cs | 8 + ...TypeNameTest.unsigned int.Unix.Preview.xml | 13 + ...ameTest.unsigned int.Windows.Compatible.cs | 8 + ...meTest.unsigned int.Windows.Compatible.xml | 13 + ...peNameTest.unsigned int.Windows.Default.cs | 8 + ...eNameTest.unsigned int.Windows.Default.xml | 13 + ...ypeNameTest.unsigned int.Windows.Latest.cs | 8 + ...peNameTest.unsigned int.Windows.Latest.xml | 13 + ...peNameTest.unsigned int.Windows.Preview.cs | 8 + ...eNameTest.unsigned int.Windows.Preview.xml | 13 + ...Test.unsigned long long.Unix.Compatible.cs | 8 + ...est.unsigned long long.Unix.Compatible.xml | 13 + ...ameTest.unsigned long long.Unix.Default.cs | 8 + ...meTest.unsigned long long.Unix.Default.xml | 13 + ...NameTest.unsigned long long.Unix.Latest.cs | 8 + ...ameTest.unsigned long long.Unix.Latest.xml | 13 + ...ameTest.unsigned long long.Unix.Preview.cs | 8 + ...meTest.unsigned long long.Unix.Preview.xml | 13 + ...t.unsigned long long.Windows.Compatible.cs | 8 + ....unsigned long long.Windows.Compatible.xml | 13 + ...Test.unsigned long long.Windows.Default.cs | 8 + ...est.unsigned long long.Windows.Default.xml | 13 + ...eTest.unsigned long long.Windows.Latest.cs | 8 + ...Test.unsigned long long.Windows.Latest.xml | 13 + ...Test.unsigned long long.Windows.Preview.cs | 8 + ...est.unsigned long long.Windows.Preview.xml | 13 + ...NameTest.unsigned short.Unix.Compatible.cs | 8 + ...ameTest.unsigned short.Unix.Compatible.xml | 13 + ...ypeNameTest.unsigned short.Unix.Default.cs | 8 + ...peNameTest.unsigned short.Unix.Default.xml | 13 + ...TypeNameTest.unsigned short.Unix.Latest.cs | 8 + ...ypeNameTest.unsigned short.Unix.Latest.xml | 13 + ...ypeNameTest.unsigned short.Unix.Preview.cs | 8 + ...peNameTest.unsigned short.Unix.Preview.xml | 13 + ...eTest.unsigned short.Windows.Compatible.cs | 8 + ...Test.unsigned short.Windows.Compatible.xml | 13 + ...NameTest.unsigned short.Windows.Default.cs | 8 + ...ameTest.unsigned short.Windows.Default.xml | 13 + ...eNameTest.unsigned short.Windows.Latest.cs | 8 + ...NameTest.unsigned short.Windows.Latest.xml | 13 + ...NameTest.unsigned short.Windows.Preview.cs | 8 + ...ameTest.unsigned short.Windows.Preview.xml | 13 + ...ditionalDefineConstTest.Unix.Compatible.cs | 8 + ...itionalDefineConstTest.Unix.Compatible.xml | 15 + ...ConditionalDefineConstTest.Unix.Default.cs | 8 + ...onditionalDefineConstTest.Unix.Default.xml | 15 + ....ConditionalDefineConstTest.Unix.Latest.cs | 8 + ...ConditionalDefineConstTest.Unix.Latest.xml | 15 + ...ConditionalDefineConstTest.Unix.Preview.cs | 8 + ...onditionalDefineConstTest.Unix.Preview.xml | 15 + ...ionalDefineConstTest.Windows.Compatible.cs | 8 + ...onalDefineConstTest.Windows.Compatible.xml | 15 + ...ditionalDefineConstTest.Windows.Default.cs | 8 + ...itionalDefineConstTest.Windows.Default.xml | 15 + ...nditionalDefineConstTest.Windows.Latest.cs | 8 + ...ditionalDefineConstTest.Windows.Latest.xml | 15 + ...ditionalDefineConstTest.Windows.Preview.cs | 8 + ...itionalDefineConstTest.Windows.Preview.xml | 15 + ...ationTest.GuidMacroTest.Unix.Compatible.cs | 10 + ...tionTest.GuidMacroTest.Unix.Compatible.xml | 13 + ...larationTest.GuidMacroTest.Unix.Default.cs | 10 + ...arationTest.GuidMacroTest.Unix.Default.xml | 13 + ...clarationTest.GuidMacroTest.Unix.Latest.cs | 10 + ...larationTest.GuidMacroTest.Unix.Latest.xml | 13 + ...larationTest.GuidMacroTest.Unix.Preview.cs | 10 + ...arationTest.GuidMacroTest.Unix.Preview.xml | 13 + ...onTest.GuidMacroTest.Windows.Compatible.cs | 10 + ...nTest.GuidMacroTest.Windows.Compatible.xml | 13 + ...ationTest.GuidMacroTest.Windows.Default.cs | 10 + ...tionTest.GuidMacroTest.Windows.Default.xml | 13 + ...rationTest.GuidMacroTest.Windows.Latest.cs | 10 + ...ationTest.GuidMacroTest.Windows.Latest.xml | 13 + ...ationTest.GuidMacroTest.Windows.Preview.cs | 10 + ...tionTest.GuidMacroTest.Windows.Preview.xml | 13 + ...ationTest.MacroTest.0.0.Unix.Compatible.cs | 11 + ...tionTest.MacroTest.0.0.Unix.Compatible.xml | 19 + ...larationTest.MacroTest.0.0.Unix.Default.cs | 11 + ...arationTest.MacroTest.0.0.Unix.Default.xml | 19 + ...clarationTest.MacroTest.0.0.Unix.Latest.cs | 11 + ...larationTest.MacroTest.0.0.Unix.Latest.xml | 19 + ...larationTest.MacroTest.0.0.Unix.Preview.cs | 11 + ...arationTest.MacroTest.0.0.Unix.Preview.xml | 19 + ...onTest.MacroTest.0.0.Windows.Compatible.cs | 11 + ...nTest.MacroTest.0.0.Windows.Compatible.xml | 19 + ...ationTest.MacroTest.0.0.Windows.Default.cs | 11 + ...tionTest.MacroTest.0.0.Windows.Default.xml | 19 + ...rationTest.MacroTest.0.0.Windows.Latest.cs | 11 + ...ationTest.MacroTest.0.0.Windows.Latest.xml | 19 + ...ationTest.MacroTest.0.0.Windows.Preview.cs | 11 + ...tionTest.MacroTest.0.0.Windows.Preview.xml | 19 + ...arationTest.MacroTest.0.Unix.Compatible.cs | 11 + ...rationTest.MacroTest.0.Unix.Compatible.xml | 19 + ...eclarationTest.MacroTest.0.Unix.Default.cs | 11 + ...clarationTest.MacroTest.0.Unix.Default.xml | 19 + ...DeclarationTest.MacroTest.0.Unix.Latest.cs | 11 + ...eclarationTest.MacroTest.0.Unix.Latest.xml | 19 + ...eclarationTest.MacroTest.0.Unix.Preview.cs | 11 + ...clarationTest.MacroTest.0.Unix.Preview.xml | 19 + ...tionTest.MacroTest.0.Windows.Compatible.cs | 11 + ...ionTest.MacroTest.0.Windows.Compatible.xml | 19 + ...arationTest.MacroTest.0.Windows.Default.cs | 11 + ...rationTest.MacroTest.0.Windows.Default.xml | 19 + ...larationTest.MacroTest.0.Windows.Latest.cs | 11 + ...arationTest.MacroTest.0.Windows.Latest.xml | 19 + ...arationTest.MacroTest.0.Windows.Preview.cs | 11 + ...rationTest.MacroTest.0.Windows.Preview.xml | 19 + ...ationTest.MacroTest.0.f.Unix.Compatible.cs | 11 + ...tionTest.MacroTest.0.f.Unix.Compatible.xml | 19 + ...larationTest.MacroTest.0.f.Unix.Default.cs | 11 + ...arationTest.MacroTest.0.f.Unix.Default.xml | 19 + ...clarationTest.MacroTest.0.f.Unix.Latest.cs | 11 + ...larationTest.MacroTest.0.f.Unix.Latest.xml | 19 + ...larationTest.MacroTest.0.f.Unix.Preview.cs | 11 + ...arationTest.MacroTest.0.f.Unix.Preview.xml | 19 + ...onTest.MacroTest.0.f.Windows.Compatible.cs | 11 + ...nTest.MacroTest.0.f.Windows.Compatible.xml | 19 + ...ationTest.MacroTest.0.f.Windows.Default.cs | 11 + ...tionTest.MacroTest.0.f.Windows.Default.xml | 19 + ...rationTest.MacroTest.0.f.Windows.Latest.cs | 11 + ...ationTest.MacroTest.0.f.Windows.Latest.xml | 19 + ...ationTest.MacroTest.0.f.Windows.Preview.cs | 11 + ...tionTest.MacroTest.0.f.Windows.Preview.xml | 19 + ...ationTest.MacroTest.0LL.Unix.Compatible.cs | 11 + ...tionTest.MacroTest.0LL.Unix.Compatible.xml | 19 + ...larationTest.MacroTest.0LL.Unix.Default.cs | 11 + ...arationTest.MacroTest.0LL.Unix.Default.xml | 19 + ...clarationTest.MacroTest.0LL.Unix.Latest.cs | 11 + ...larationTest.MacroTest.0LL.Unix.Latest.xml | 19 + ...larationTest.MacroTest.0LL.Unix.Preview.cs | 11 + ...arationTest.MacroTest.0LL.Unix.Preview.xml | 19 + ...onTest.MacroTest.0LL.Windows.Compatible.cs | 11 + ...nTest.MacroTest.0LL.Windows.Compatible.xml | 19 + ...ationTest.MacroTest.0LL.Windows.Default.cs | 11 + ...tionTest.MacroTest.0LL.Windows.Default.xml | 19 + ...rationTest.MacroTest.0LL.Windows.Latest.cs | 11 + ...ationTest.MacroTest.0LL.Windows.Latest.xml | 19 + ...ationTest.MacroTest.0LL.Windows.Preview.cs | 11 + ...tionTest.MacroTest.0LL.Windows.Preview.xml | 19 + ...tionTest.MacroTest.0LLU.Unix.Compatible.cs | 11 + ...ionTest.MacroTest.0LLU.Unix.Compatible.xml | 19 + ...arationTest.MacroTest.0LLU.Unix.Default.cs | 11 + ...rationTest.MacroTest.0LLU.Unix.Default.xml | 19 + ...larationTest.MacroTest.0LLU.Unix.Latest.cs | 11 + ...arationTest.MacroTest.0LLU.Unix.Latest.xml | 19 + ...arationTest.MacroTest.0LLU.Unix.Preview.cs | 11 + ...rationTest.MacroTest.0LLU.Unix.Preview.xml | 19 + ...nTest.MacroTest.0LLU.Windows.Compatible.cs | 11 + ...Test.MacroTest.0LLU.Windows.Compatible.xml | 19 + ...tionTest.MacroTest.0LLU.Windows.Default.cs | 11 + ...ionTest.MacroTest.0LLU.Windows.Default.xml | 19 + ...ationTest.MacroTest.0LLU.Windows.Latest.cs | 11 + ...tionTest.MacroTest.0LLU.Windows.Latest.xml | 19 + ...tionTest.MacroTest.0LLU.Windows.Preview.cs | 11 + ...ionTest.MacroTest.0LLU.Windows.Preview.xml | 19 + ...rationTest.MacroTest.0U.Unix.Compatible.cs | 11 + ...ationTest.MacroTest.0U.Unix.Compatible.xml | 19 + ...clarationTest.MacroTest.0U.Unix.Default.cs | 11 + ...larationTest.MacroTest.0U.Unix.Default.xml | 19 + ...eclarationTest.MacroTest.0U.Unix.Latest.cs | 11 + ...clarationTest.MacroTest.0U.Unix.Latest.xml | 19 + ...clarationTest.MacroTest.0U.Unix.Preview.cs | 11 + ...larationTest.MacroTest.0U.Unix.Preview.xml | 19 + ...ionTest.MacroTest.0U.Windows.Compatible.cs | 11 + ...onTest.MacroTest.0U.Windows.Compatible.xml | 19 + ...rationTest.MacroTest.0U.Windows.Default.cs | 11 + ...ationTest.MacroTest.0U.Windows.Default.xml | 19 + ...arationTest.MacroTest.0U.Windows.Latest.cs | 11 + ...rationTest.MacroTest.0U.Windows.Latest.xml | 19 + ...rationTest.MacroTest.0U.Windows.Preview.cs | 11 + ...ationTest.MacroTest.0U.Windows.Preview.xml | 19 + ...tionTest.MacroTest.0ULL.Unix.Compatible.cs | 11 + ...ionTest.MacroTest.0ULL.Unix.Compatible.xml | 19 + ...arationTest.MacroTest.0ULL.Unix.Default.cs | 11 + ...rationTest.MacroTest.0ULL.Unix.Default.xml | 19 + ...larationTest.MacroTest.0ULL.Unix.Latest.cs | 11 + ...arationTest.MacroTest.0ULL.Unix.Latest.xml | 19 + ...arationTest.MacroTest.0ULL.Unix.Preview.cs | 11 + ...rationTest.MacroTest.0ULL.Unix.Preview.xml | 19 + ...nTest.MacroTest.0ULL.Windows.Compatible.cs | 11 + ...Test.MacroTest.0ULL.Windows.Compatible.xml | 19 + ...tionTest.MacroTest.0ULL.Windows.Default.cs | 11 + ...ionTest.MacroTest.0ULL.Windows.Default.xml | 19 + ...ationTest.MacroTest.0ULL.Windows.Latest.cs | 11 + ...tionTest.MacroTest.0ULL.Windows.Latest.xml | 19 + ...tionTest.MacroTest.0ULL.Windows.Preview.cs | 11 + ...ionTest.MacroTest.0ULL.Windows.Preview.xml | 19 + ...ultidimensionlArrayTest.Unix.Compatible.cs | 20 + ...ltidimensionlArrayTest.Unix.Compatible.xml | 25 + ...t.MultidimensionlArrayTest.Unix.Default.cs | 20 + ....MultidimensionlArrayTest.Unix.Default.xml | 25 + ...st.MultidimensionlArrayTest.Unix.Latest.cs | 20 + ...t.MultidimensionlArrayTest.Unix.Latest.xml | 25 + ...t.MultidimensionlArrayTest.Unix.Preview.cs | 20 + ....MultidimensionlArrayTest.Unix.Preview.xml | 25 + ...idimensionlArrayTest.Windows.Compatible.cs | 20 + ...dimensionlArrayTest.Windows.Compatible.xml | 25 + ...ultidimensionlArrayTest.Windows.Default.cs | 20 + ...ltidimensionlArrayTest.Windows.Default.xml | 25 + ...MultidimensionlArrayTest.Windows.Latest.cs | 20 + ...ultidimensionlArrayTest.Windows.Latest.xml | 25 + ...ultidimensionlArrayTest.Windows.Preview.cs | 20 + ...ltidimensionlArrayTest.Windows.Preview.xml | 25 + ...Test.MultilineMacroTest.Unix.Compatible.cs | 8 + ...est.MultilineMacroTest.Unix.Compatible.xml | 13 + ...ionTest.MultilineMacroTest.Unix.Default.cs | 8 + ...onTest.MultilineMacroTest.Unix.Default.xml | 13 + ...tionTest.MultilineMacroTest.Unix.Latest.cs | 8 + ...ionTest.MultilineMacroTest.Unix.Latest.xml | 13 + ...ionTest.MultilineMacroTest.Unix.Preview.cs | 8 + ...onTest.MultilineMacroTest.Unix.Preview.xml | 13 + ...t.MultilineMacroTest.Windows.Compatible.cs | 8 + ....MultilineMacroTest.Windows.Compatible.xml | 13 + ...Test.MultilineMacroTest.Windows.Default.cs | 8 + ...est.MultilineMacroTest.Windows.Default.xml | 13 + ...nTest.MultilineMacroTest.Windows.Latest.cs | 8 + ...Test.MultilineMacroTest.Windows.Latest.xml | 13 + ...Test.MultilineMacroTest.Windows.Preview.cs | 8 + ...est.MultilineMacroTest.Windows.Preview.xml | 13 + ...oInitializerTest.double.Unix.Compatible.cs | 0 ...InitializerTest.double.Unix.Compatible.xml | 0 ...t.NoInitializerTest.double.Unix.Default.cs | 0 ....NoInitializerTest.double.Unix.Default.xml | 0 ...st.NoInitializerTest.double.Unix.Latest.cs | 0 ...t.NoInitializerTest.double.Unix.Latest.xml | 0 ...t.NoInitializerTest.double.Unix.Preview.cs | 0 ....NoInitializerTest.double.Unix.Preview.xml | 0 ...itializerTest.double.Windows.Compatible.cs | 0 ...tializerTest.double.Windows.Compatible.xml | 0 ...oInitializerTest.double.Windows.Default.cs | 0 ...InitializerTest.double.Windows.Default.xml | 0 ...NoInitializerTest.double.Windows.Latest.cs | 0 ...oInitializerTest.double.Windows.Latest.xml | 0 ...oInitializerTest.double.Windows.Preview.cs | 0 ...InitializerTest.double.Windows.Preview.xml | 0 ...NoInitializerTest.float.Unix.Compatible.cs | 0 ...oInitializerTest.float.Unix.Compatible.xml | 0 ...st.NoInitializerTest.float.Unix.Default.cs | 0 ...t.NoInitializerTest.float.Unix.Default.xml | 0 ...est.NoInitializerTest.float.Unix.Latest.cs | 0 ...st.NoInitializerTest.float.Unix.Latest.xml | 0 ...st.NoInitializerTest.float.Unix.Preview.cs | 0 ...t.NoInitializerTest.float.Unix.Preview.xml | 0 ...nitializerTest.float.Windows.Compatible.cs | 0 ...itializerTest.float.Windows.Compatible.xml | 0 ...NoInitializerTest.float.Windows.Default.cs | 0 ...oInitializerTest.float.Windows.Default.xml | 0 ....NoInitializerTest.float.Windows.Latest.cs | 0 ...NoInitializerTest.float.Windows.Latest.xml | 0 ...NoInitializerTest.float.Windows.Preview.cs | 0 ...oInitializerTest.float.Windows.Preview.xml | 0 ...t.NoInitializerTest.int.Unix.Compatible.cs | 0 ....NoInitializerTest.int.Unix.Compatible.xml | 0 ...Test.NoInitializerTest.int.Unix.Default.cs | 0 ...est.NoInitializerTest.int.Unix.Default.xml | 0 ...nTest.NoInitializerTest.int.Unix.Latest.cs | 0 ...Test.NoInitializerTest.int.Unix.Latest.xml | 0 ...Test.NoInitializerTest.int.Unix.Preview.cs | 0 ...est.NoInitializerTest.int.Unix.Preview.xml | 0 ...oInitializerTest.int.Windows.Compatible.cs | 0 ...InitializerTest.int.Windows.Compatible.xml | 0 ...t.NoInitializerTest.int.Windows.Default.cs | 0 ....NoInitializerTest.int.Windows.Default.xml | 0 ...st.NoInitializerTest.int.Windows.Latest.cs | 0 ...t.NoInitializerTest.int.Windows.Latest.xml | 0 ...t.NoInitializerTest.int.Windows.Preview.cs | 0 ....NoInitializerTest.int.Windows.Preview.xml | 0 ...NoInitializerTest.short.Unix.Compatible.cs | 0 ...oInitializerTest.short.Unix.Compatible.xml | 0 ...st.NoInitializerTest.short.Unix.Default.cs | 0 ...t.NoInitializerTest.short.Unix.Default.xml | 0 ...est.NoInitializerTest.short.Unix.Latest.cs | 0 ...st.NoInitializerTest.short.Unix.Latest.xml | 0 ...st.NoInitializerTest.short.Unix.Preview.cs | 0 ...t.NoInitializerTest.short.Unix.Preview.xml | 0 ...nitializerTest.short.Windows.Compatible.cs | 0 ...itializerTest.short.Windows.Compatible.xml | 0 ...NoInitializerTest.short.Windows.Default.cs | 0 ...oInitializerTest.short.Windows.Default.xml | 0 ....NoInitializerTest.short.Windows.Latest.cs | 0 ...NoInitializerTest.short.Windows.Latest.xml | 0 ...NoInitializerTest.short.Windows.Preview.cs | 0 ...oInitializerTest.short.Windows.Preview.xml | 0 ....StringLiteralConstTest.Unix.Compatible.cs | 16 + ...StringLiteralConstTest.Unix.Compatible.xml | 25 + ...est.StringLiteralConstTest.Unix.Default.cs | 16 + ...st.StringLiteralConstTest.Unix.Default.xml | 25 + ...Test.StringLiteralConstTest.Unix.Latest.cs | 16 + ...est.StringLiteralConstTest.Unix.Latest.xml | 25 + ...est.StringLiteralConstTest.Unix.Preview.cs | 16 + ...st.StringLiteralConstTest.Unix.Preview.xml | 25 + ...ringLiteralConstTest.Windows.Compatible.cs | 16 + ...ingLiteralConstTest.Windows.Compatible.xml | 25 + ....StringLiteralConstTest.Windows.Default.cs | 16 + ...StringLiteralConstTest.Windows.Default.xml | 25 + ...t.StringLiteralConstTest.Windows.Latest.cs | 16 + ....StringLiteralConstTest.Windows.Latest.xml | 25 + ....StringLiteralConstTest.Windows.Preview.cs | 16 + ...StringLiteralConstTest.Windows.Preview.xml | 25 + ...gLiteralStaticConstTest.Unix.Compatible.cs | 16 + ...LiteralStaticConstTest.Unix.Compatible.xml | 25 + ...ringLiteralStaticConstTest.Unix.Default.cs | 16 + ...ingLiteralStaticConstTest.Unix.Default.xml | 25 + ...tringLiteralStaticConstTest.Unix.Latest.cs | 16 + ...ringLiteralStaticConstTest.Unix.Latest.xml | 25 + ...ringLiteralStaticConstTest.Unix.Preview.cs | 16 + ...ingLiteralStaticConstTest.Unix.Preview.xml | 25 + ...teralStaticConstTest.Windows.Compatible.cs | 16 + ...eralStaticConstTest.Windows.Compatible.xml | 25 + ...gLiteralStaticConstTest.Windows.Default.cs | 16 + ...LiteralStaticConstTest.Windows.Default.xml | 25 + ...ngLiteralStaticConstTest.Windows.Latest.cs | 16 + ...gLiteralStaticConstTest.Windows.Latest.xml | 25 + ...gLiteralStaticConstTest.Windows.Preview.cs | 16 + ...LiteralStaticConstTest.Windows.Preview.xml | 25 + ...ckedConversionMacroTest.Unix.Compatible.cs | 11 + ...kedConversionMacroTest.Unix.Compatible.xml | 27 + ...checkedConversionMacroTest.Unix.Default.cs | 11 + ...heckedConversionMacroTest.Unix.Default.xml | 27 + ...ncheckedConversionMacroTest.Unix.Latest.cs | 11 + ...checkedConversionMacroTest.Unix.Latest.xml | 27 + ...checkedConversionMacroTest.Unix.Preview.cs | 11 + ...heckedConversionMacroTest.Unix.Preview.xml | 27 + ...dConversionMacroTest.Windows.Compatible.cs | 11 + ...ConversionMacroTest.Windows.Compatible.xml | 27 + ...ckedConversionMacroTest.Windows.Default.cs | 11 + ...kedConversionMacroTest.Windows.Default.xml | 27 + ...eckedConversionMacroTest.Windows.Latest.cs | 11 + ...ckedConversionMacroTest.Windows.Latest.xml | 27 + ...ckedConversionMacroTest.Windows.Preview.cs | 11 + ...kedConversionMacroTest.Windows.Preview.xml | 27 + ...kedConversionMacroTest2.Unix.Compatible.cs | 8 + ...edConversionMacroTest2.Unix.Compatible.xml | 15 + ...heckedConversionMacroTest2.Unix.Default.cs | 8 + ...eckedConversionMacroTest2.Unix.Default.xml | 15 + ...checkedConversionMacroTest2.Unix.Latest.cs | 8 + ...heckedConversionMacroTest2.Unix.Latest.xml | 15 + ...heckedConversionMacroTest2.Unix.Preview.cs | 8 + ...eckedConversionMacroTest2.Unix.Preview.xml | 15 + ...ConversionMacroTest2.Windows.Compatible.cs | 8 + ...onversionMacroTest2.Windows.Compatible.xml | 15 + ...kedConversionMacroTest2.Windows.Default.cs | 8 + ...edConversionMacroTest2.Windows.Default.xml | 15 + ...ckedConversionMacroTest2.Windows.Latest.cs | 8 + ...kedConversionMacroTest2.Windows.Latest.xml | 15 + ...kedConversionMacroTest2.Windows.Preview.cs | 8 + ...edConversionMacroTest2.Windows.Preview.xml | 15 + ...nctionLikeCastMacroTest.Unix.Compatible.cs | 8 + ...ctionLikeCastMacroTest.Unix.Compatible.xml | 17 + ...dFunctionLikeCastMacroTest.Unix.Default.cs | 8 + ...FunctionLikeCastMacroTest.Unix.Default.xml | 17 + ...edFunctionLikeCastMacroTest.Unix.Latest.cs | 8 + ...dFunctionLikeCastMacroTest.Unix.Latest.xml | 17 + ...dFunctionLikeCastMacroTest.Unix.Preview.cs | 8 + ...FunctionLikeCastMacroTest.Unix.Preview.xml | 17 + ...ionLikeCastMacroTest.Windows.Compatible.cs | 8 + ...onLikeCastMacroTest.Windows.Compatible.xml | 17 + ...nctionLikeCastMacroTest.Windows.Default.cs | 8 + ...ctionLikeCastMacroTest.Windows.Default.xml | 17 + ...unctionLikeCastMacroTest.Windows.Latest.cs | 8 + ...nctionLikeCastMacroTest.Windows.Latest.xml | 17 + ...nctionLikeCastMacroTest.Windows.Preview.cs | 8 + ...ctionLikeCastMacroTest.Windows.Preview.xml | 17 + ...checkedPointerMacroTest.Unix.Compatible.cs | 8 + ...heckedPointerMacroTest.Unix.Compatible.xml | 15 + ....UncheckedPointerMacroTest.Unix.Default.cs | 8 + ...UncheckedPointerMacroTest.Unix.Default.xml | 15 + ...t.UncheckedPointerMacroTest.Unix.Latest.cs | 8 + ....UncheckedPointerMacroTest.Unix.Latest.xml | 15 + ....UncheckedPointerMacroTest.Unix.Preview.cs | 8 + ...UncheckedPointerMacroTest.Unix.Preview.xml | 15 + ...ckedPointerMacroTest.Windows.Compatible.cs | 8 + ...kedPointerMacroTest.Windows.Compatible.xml | 15 + ...checkedPointerMacroTest.Windows.Default.cs | 8 + ...heckedPointerMacroTest.Windows.Default.xml | 15 + ...ncheckedPointerMacroTest.Windows.Latest.cs | 8 + ...checkedPointerMacroTest.Windows.Latest.xml | 15 + ...checkedPointerMacroTest.Windows.Preview.cs | 8 + ...heckedPointerMacroTest.Windows.Preview.xml | 15 + ...einterpretCastMacroTest.Unix.Compatible.cs | 8 + ...interpretCastMacroTest.Unix.Compatible.xml | 17 + ...edReinterpretCastMacroTest.Unix.Default.cs | 8 + ...dReinterpretCastMacroTest.Unix.Default.xml | 17 + ...kedReinterpretCastMacroTest.Unix.Latest.cs | 8 + ...edReinterpretCastMacroTest.Unix.Latest.xml | 17 + ...edReinterpretCastMacroTest.Unix.Preview.cs | 8 + ...dReinterpretCastMacroTest.Unix.Preview.xml | 17 + ...terpretCastMacroTest.Windows.Compatible.cs | 8 + ...erpretCastMacroTest.Windows.Compatible.xml | 17 + ...einterpretCastMacroTest.Windows.Default.cs | 8 + ...interpretCastMacroTest.Windows.Default.xml | 17 + ...ReinterpretCastMacroTest.Windows.Latest.cs | 8 + ...einterpretCastMacroTest.Windows.Latest.xml | 17 + ...einterpretCastMacroTest.Windows.Preview.cs | 8 + ...interpretCastMacroTest.Windows.Preview.xml | 17 + ...6StringLiteralMacroTest.Unix.Compatible.cs | 8 + ...StringLiteralMacroTest.Unix.Compatible.xml | 13 + ...tf16StringLiteralMacroTest.Unix.Default.cs | 8 + ...f16StringLiteralMacroTest.Unix.Default.xml | 13 + ...Utf16StringLiteralMacroTest.Unix.Latest.cs | 8 + ...tf16StringLiteralMacroTest.Unix.Latest.xml | 13 + ...tf16StringLiteralMacroTest.Unix.Preview.cs | 8 + ...f16StringLiteralMacroTest.Unix.Preview.xml | 13 + ...ringLiteralMacroTest.Windows.Compatible.cs | 8 + ...ingLiteralMacroTest.Windows.Compatible.xml | 13 + ...6StringLiteralMacroTest.Windows.Default.cs | 8 + ...StringLiteralMacroTest.Windows.Default.xml | 13 + ...16StringLiteralMacroTest.Windows.Latest.cs | 8 + ...6StringLiteralMacroTest.Windows.Latest.xml | 13 + ...6StringLiteralMacroTest.Windows.Preview.cs | 8 + ...StringLiteralMacroTest.Windows.Preview.xml | 13 + ...8StringLiteralMacroTest.Unix.Compatible.cs | 10 + ...StringLiteralMacroTest.Unix.Compatible.xml | 13 + ...Utf8StringLiteralMacroTest.Unix.Default.cs | 10 + ...tf8StringLiteralMacroTest.Unix.Default.xml | 13 + ....Utf8StringLiteralMacroTest.Unix.Latest.cs | 10 + ...Utf8StringLiteralMacroTest.Unix.Latest.xml | 13 + ...Utf8StringLiteralMacroTest.Unix.Preview.cs | 10 + ...tf8StringLiteralMacroTest.Unix.Preview.xml | 13 + ...ringLiteralMacroTest.Windows.Compatible.cs | 10 + ...ingLiteralMacroTest.Windows.Compatible.xml | 13 + ...8StringLiteralMacroTest.Windows.Default.cs | 10 + ...StringLiteralMacroTest.Windows.Default.xml | 13 + ...f8StringLiteralMacroTest.Windows.Latest.cs | 10 + ...8StringLiteralMacroTest.Windows.Latest.xml | 13 + ...8StringLiteralMacroTest.Windows.Preview.cs | 10 + ...StringLiteralMacroTest.Windows.Preview.xml | 13 + ...eStringLiteralConstTest.Unix.Compatible.cs | 14 + ...StringLiteralConstTest.Unix.Compatible.xml | 25 + ...WideStringLiteralConstTest.Unix.Default.cs | 14 + ...ideStringLiteralConstTest.Unix.Default.xml | 25 + ....WideStringLiteralConstTest.Unix.Latest.cs | 14 + ...WideStringLiteralConstTest.Unix.Latest.xml | 25 + ...WideStringLiteralConstTest.Unix.Preview.cs | 14 + ...ideStringLiteralConstTest.Unix.Preview.xml | 25 + ...ringLiteralConstTest.Windows.Compatible.cs | 14 + ...ingLiteralConstTest.Windows.Compatible.xml | 25 + ...eStringLiteralConstTest.Windows.Default.cs | 14 + ...StringLiteralConstTest.Windows.Default.xml | 25 + ...deStringLiteralConstTest.Windows.Latest.cs | 14 + ...eStringLiteralConstTest.Windows.Latest.xml | 25 + ...eStringLiteralConstTest.Windows.Preview.cs | 14 + ...StringLiteralConstTest.Windows.Preview.xml | 25 + ...gLiteralStaticConstTest.Unix.Compatible.cs | 14 + ...LiteralStaticConstTest.Unix.Compatible.xml | 25 + ...ringLiteralStaticConstTest.Unix.Default.cs | 14 + ...ingLiteralStaticConstTest.Unix.Default.xml | 25 + ...tringLiteralStaticConstTest.Unix.Latest.cs | 14 + ...ringLiteralStaticConstTest.Unix.Latest.xml | 25 + ...ringLiteralStaticConstTest.Unix.Preview.cs | 14 + ...ingLiteralStaticConstTest.Unix.Preview.xml | 25 + ...teralStaticConstTest.Windows.Compatible.cs | 14 + ...eralStaticConstTest.Windows.Compatible.xml | 25 + ...gLiteralStaticConstTest.Windows.Default.cs | 14 + ...LiteralStaticConstTest.Windows.Default.xml | 25 + ...ngLiteralStaticConstTest.Windows.Latest.cs | 14 + ...gLiteralStaticConstTest.Windows.Latest.xml | 25 + ...gLiteralStaticConstTest.Windows.Preview.cs | 14 + ...LiteralStaticConstTest.Windows.Preview.xml | 25 + .../CXXMethodDeclarationTest.cs | 1063 --------- .../DeprecatedToObsoleteTest.cs | 521 ----- .../EnumDeclarationTest.cs | 610 ----- .../FunctionDeclarationBodyImportTest.cs | 1795 --------------- .../FunctionDeclarationDllImportTest.cs | 412 ---- .../FunctionPointerDeclarationTest.cs | 94 - .../StructDeclarationTest.cs | 2021 ---------------- .../UnionDeclarationTest.cs | 1584 ------------- .../VarDeclarationTest.cs | 401 ---- .../CXXMethodDeclarationTest.cs | 1058 --------- .../DeprecatedToObsoleteTest.cs | 521 ----- .../EnumDeclarationTest.cs | 611 ----- .../FunctionDeclarationBodyImportTest.cs | 1795 --------------- .../FunctionDeclarationDllImportTest.cs | 429 ---- .../FunctionPointerDeclarationTest.cs | 94 - .../StructDeclarationTest.cs | 2027 ----------------- .../UnionDeclarationTest.cs | 1573 ------------- .../VarDeclarationTest.cs | 398 ---- .../CXXMethodDeclarationTest.cs | 950 -------- .../DeprecatedToObsoleteTest.cs | 506 ---- .../CSharpDefaultUnix/EnumDeclarationTest.cs | 611 ----- .../FunctionDeclarationBodyImportTest.cs | 1779 --------------- .../FunctionDeclarationDllImportTest.cs | 411 ---- .../FunctionPointerDeclarationTest.cs | 76 - .../StructDeclarationTest.cs | 1998 ---------------- .../CSharpDefaultUnix/UnionDeclarationTest.cs | 1558 ------------- .../CSharpDefaultUnix/VarDeclarationTest.cs | 398 ---- .../CXXMethodDeclarationTest.cs | 955 -------- .../DeprecatedToObsoleteTest.cs | 506 ---- .../EnumDeclarationTest.cs | 610 ----- .../FunctionDeclarationBodyImportTest.cs | 1779 --------------- .../FunctionDeclarationDllImportTest.cs | 429 ---- .../FunctionPointerDeclarationTest.cs | 76 - .../StructDeclarationTest.cs | 2004 ---------------- .../UnionDeclarationTest.cs | 1547 ------------- .../VarDeclarationTest.cs | 398 ---- .../CXXMethodDeclarationTest.cs | 950 -------- .../DeprecatedToObsoleteTest.cs | 506 ---- .../CSharpLatestUnix/EnumDeclarationTest.cs | 611 ----- .../FunctionDeclarationBodyImportTest.cs | 1781 --------------- .../FunctionDeclarationDllImportTest.cs | 411 ---- .../FunctionPointerDeclarationTest.cs | 76 - .../CSharpLatestUnix/StructDeclarationTest.cs | 1960 ---------------- .../CSharpLatestUnix/UnionDeclarationTest.cs | 1513 ------------ .../CSharpLatestUnix/VarDeclarationTest.cs | 400 ---- .../CXXMethodDeclarationTest.cs | 950 -------- .../DeprecatedToObsoleteTest.cs | 506 ---- .../EnumDeclarationTest.cs | 611 ----- .../FunctionDeclarationBodyImportTest.cs | 1781 --------------- .../FunctionDeclarationDllImportTest.cs | 428 ---- .../FunctionPointerDeclarationTest.cs | 76 - .../StructDeclarationTest.cs | 1966 ---------------- .../UnionDeclarationTest.cs | 1519 ------------ .../CSharpLatestWindows/VarDeclarationTest.cs | 398 ---- .../CXXMethodDeclarationTest.cs | 950 -------- .../DeprecatedToObsoleteTest.cs | 506 ---- .../CSharpPreviewUnix/EnumDeclarationTest.cs | 611 ----- .../FunctionDeclarationBodyImportTest.cs | 1781 --------------- .../FunctionDeclarationDllImportTest.cs | 411 ---- .../FunctionPointerDeclarationTest.cs | 76 - .../StructDeclarationTest.cs | 1960 ---------------- .../CSharpPreviewUnix/UnionDeclarationTest.cs | 1513 ------------ .../CSharpPreviewUnix/VarDeclarationTest.cs | 402 ---- .../CXXMethodDeclarationTest.cs | 950 -------- .../DeprecatedToObsoleteTest.cs | 506 ---- .../EnumDeclarationTest.cs | 611 ----- .../FunctionDeclarationBodyImportTest.cs | 1781 --------------- .../FunctionDeclarationDllImportTest.cs | 428 ---- .../FunctionPointerDeclarationTest.cs | 76 - .../StructDeclarationTest.cs | 1966 ---------------- .../UnionDeclarationTest.cs | 1519 ------------ .../VarDeclarationTest.cs | 398 ---- .../CTest.cs | 192 +- .../CXXMethodDeclarationTest.cs | 423 ++++ ...angSharp.PInvokeGenerator.UnitTests.csproj | 2 + .../DeprecatedToObsoleteTest.cs | 248 ++ .../EnumDeclarationTest.cs | 374 +++ .../FunctionDeclarationBodyImportTest.cs | 908 ++++++++ .../FunctionDeclarationDllImportTest.cs | 217 ++ .../FunctionPointerDeclarationTest.cs | 50 + .../OptionsTest.cs | 54 +- .../PInvokeGeneratorTest.cs | 216 +- .../StructDeclarationTest.cs | 798 +++++++ .../UnionDeclarationTest.cs | 590 +++++ .../VarDeclarationTest.cs | 208 ++ .../CXXMethodDeclarationTest.cs | 1281 ----------- .../DeprecatedToObsoleteTest.cs | 551 ----- .../XmlCompatibleUnix/EnumDeclarationTest.cs | 730 ------ .../FunctionDeclarationBodyImportTest.cs | 2013 ---------------- .../FunctionDeclarationDllImportTest.cs | 464 ---- .../FunctionPointerDeclarationTest.cs | 91 - .../StructDeclarationTest.cs | 1986 ---------------- .../XmlCompatibleUnix/UnionDeclarationTest.cs | 1459 ------------ .../XmlCompatibleUnix/VarDeclarationTest.cs | 533 ----- .../CXXMethodDeclarationTest.cs | 1282 ----------- .../DeprecatedToObsoleteTest.cs | 551 ----- .../EnumDeclarationTest.cs | 730 ------ .../FunctionDeclarationBodyImportTest.cs | 2013 ---------------- .../FunctionDeclarationDllImportTest.cs | 464 ---- .../FunctionPointerDeclarationTest.cs | 91 - .../StructDeclarationTest.cs | 1995 ---------------- .../UnionDeclarationTest.cs | 1445 ------------ .../VarDeclarationTest.cs | 533 ----- .../CXXMethodDeclarationTest.cs | 1102 --------- .../DeprecatedToObsoleteTest.cs | 537 ----- .../XmlDefaultUnix/EnumDeclarationTest.cs | 730 ------ .../FunctionDeclarationBodyImportTest.cs | 1992 ---------------- .../FunctionDeclarationDllImportTest.cs | 464 ---- .../FunctionPointerDeclarationTest.cs | 82 - .../XmlDefaultUnix/StructDeclarationTest.cs | 1967 ---------------- .../XmlDefaultUnix/UnionDeclarationTest.cs | 1437 ------------ .../XmlDefaultUnix/VarDeclarationTest.cs | 533 ----- .../CXXMethodDeclarationTest.cs | 1102 --------- .../DeprecatedToObsoleteTest.cs | 537 ----- .../XmlDefaultWindows/EnumDeclarationTest.cs | 730 ------ .../FunctionDeclarationBodyImportTest.cs | 1992 ---------------- .../FunctionDeclarationDllImportTest.cs | 464 ---- .../FunctionPointerDeclarationTest.cs | 82 - .../StructDeclarationTest.cs | 1977 ---------------- .../XmlDefaultWindows/UnionDeclarationTest.cs | 1422 ------------ .../XmlDefaultWindows/VarDeclarationTest.cs | 533 ----- .../XmlLatestUnix/CXXMethodDeclarationTest.cs | 1102 --------- .../XmlLatestUnix/DeprecatedToObsoleteTest.cs | 537 ----- .../XmlLatestUnix/EnumDeclarationTest.cs | 730 ------ .../FunctionDeclarationBodyImportTest.cs | 1992 ---------------- .../FunctionDeclarationDllImportTest.cs | 464 ---- .../FunctionPointerDeclarationTest.cs | 82 - .../XmlLatestUnix/StructDeclarationTest.cs | 1841 --------------- .../XmlLatestUnix/UnionDeclarationTest.cs | 1311 ----------- .../XmlLatestUnix/VarDeclarationTest.cs | 533 ----- .../CXXMethodDeclarationTest.cs | 1102 --------- .../DeprecatedToObsoleteTest.cs | 537 ----- .../XmlLatestWindows/EnumDeclarationTest.cs | 730 ------ .../FunctionDeclarationBodyImportTest.cs | 1992 ---------------- .../FunctionDeclarationDllImportTest.cs | 464 ---- .../FunctionPointerDeclarationTest.cs | 82 - .../XmlLatestWindows/StructDeclarationTest.cs | 1851 --------------- .../XmlLatestWindows/UnionDeclarationTest.cs | 1317 ----------- .../XmlLatestWindows/VarDeclarationTest.cs | 534 ----- .../CXXMethodDeclarationTest.cs | 1100 --------- .../DeprecatedToObsoleteTest.cs | 537 ----- .../XmlPreviewUnix/EnumDeclarationTest.cs | 730 ------ .../FunctionDeclarationBodyImportTest.cs | 1992 ---------------- .../FunctionDeclarationDllImportTest.cs | 464 ---- .../FunctionPointerDeclarationTest.cs | 82 - .../XmlPreviewUnix/StructDeclarationTest.cs | 1841 --------------- .../XmlPreviewUnix/UnionDeclarationTest.cs | 1311 ----------- .../XmlPreviewUnix/VarDeclarationTest.cs | 533 ----- .../CXXMethodDeclarationTest.cs | 1101 --------- .../DeprecatedToObsoleteTest.cs | 537 ----- .../XmlPreviewWindows/EnumDeclarationTest.cs | 730 ------ .../FunctionDeclarationBodyImportTest.cs | 1992 ---------------- .../FunctionDeclarationDllImportTest.cs | 464 ---- .../FunctionPointerDeclarationTest.cs | 82 - .../StructDeclarationTest.cs | 1851 --------------- .../XmlPreviewWindows/UnionDeclarationTest.cs | 1317 ----------- .../XmlPreviewWindows/VarDeclarationTest.cs | 533 ----- 7501 files changed, 163437 insertions(+), 138541 deletions(-) delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Base/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Base/CXXMethodDeclarationXmlTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Base/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Base/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Base/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Base/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Base/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Base/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Base/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Base/VarDeclarationTest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.BasicTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.BasicTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.EnumTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.EnumTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.MacroTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.MacroTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.StructTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.StructTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.UnionTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.UnionTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/OptionsTest.WithAttributes.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/OptionsTest.WithAttributes.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/OptionsTest.WithUsings.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/OptionsTest.WithUsings.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Preview.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Compatible.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Compatible.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Default.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Default.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Latest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Latest.xml create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Preview.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Preview.xml delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/VarDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/VarDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/VarDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/VarDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/VarDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/VarDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/VarDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/VarDeclarationTest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/CXXMethodDeclarationTest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/DeprecatedToObsoleteTest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/EnumDeclarationTest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/FunctionDeclarationBodyImportTest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/FunctionDeclarationDllImportTest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/FunctionPointerDeclarationTest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/StructDeclarationTest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/UnionDeclarationTest.cs create mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/VarDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/VarDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/VarDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/VarDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/VarDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/VarDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/VarDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/VarDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/CXXMethodDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/DeprecatedToObsoleteTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/EnumDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionDeclarationBodyImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionDeclarationDllImportTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionPointerDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/StructDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/UnionDeclarationTest.cs delete mode 100644 tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/VarDeclarationTest.cs diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/CXXMethodDeclarationTest.cs deleted file mode 100644 index 05f77d4c..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,146 +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 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(); - - [Test] - public virtual Task MacrosExpansionTest() - { - 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 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 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 6c828d97..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/CXXMethodDeclarationXmlTest.cs +++ /dev/null @@ -1,53 +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 CXXMethodDeclarationXmlTest: CXXMethodDeclarationTest -{ - [Test] - public override Task MacrosExpansionTest() - { - 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); - } -} 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/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 0f3b3e46..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/StructDeclarationTest.cs +++ /dev/null @@ -1,293 +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(); - - 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(); -} 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 864cd583..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Base/VarDeclarationTest.cs +++ /dev/null @@ -1,124 +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(); - - 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(); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.BasicTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.BasicTest.Unix.Latest.cs new file mode 100644 index 00000000..9360543f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.BasicTest.Unix.Latest.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/Baselines/CTest.BasicTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.BasicTest.Windows.Latest.cs new file mode 100644 index 00000000..95603a8e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.BasicTest.Windows.Latest.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/Baselines/CTest.EnumTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.EnumTest.Unix.Latest.cs new file mode 100644 index 00000000..22045657 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.EnumTest.Unix.Latest.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/Baselines/CTest.EnumTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.EnumTest.Windows.Latest.cs new file mode 100644 index 00000000..a9bbb306 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.EnumTest.Windows.Latest.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/Baselines/CTest.MacroTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.MacroTest.Unix.Latest.cs new file mode 100644 index 00000000..d1100643 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.MacroTest.Unix.Latest.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/Baselines/CTest.MacroTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.MacroTest.Windows.Latest.cs new file mode 100644 index 00000000..d1100643 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.MacroTest.Windows.Latest.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/Baselines/CTest.StructTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.StructTest.Unix.Latest.cs new file mode 100644 index 00000000..a08172e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.StructTest.Unix.Latest.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/Baselines/CTest.StructTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.StructTest.Windows.Latest.cs new file mode 100644 index 00000000..a08172e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.StructTest.Windows.Latest.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/Baselines/CTest.UnionTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.UnionTest.Unix.Latest.cs new file mode 100644 index 00000000..e7226974 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.UnionTest.Unix.Latest.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/Baselines/CTest.UnionTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.UnionTest.Windows.Latest.cs new file mode 100644 index 00000000..e7226974 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CTest.UnionTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Compatible.cs new file mode 100644 index 00000000..2f18e222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Compatible.xml new file mode 100644 index 00000000..b5995343 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + + void + + int + + _value = value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Default.cs new file mode 100644 index 00000000..2f18e222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Default.xml new file mode 100644 index 00000000..b5995343 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + + void + + int + + _value = value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Latest.cs new file mode 100644 index 00000000..2f18e222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Latest.xml new file mode 100644 index 00000000..b5995343 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + + void + + int + + _value = value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Preview.cs new file mode 100644 index 00000000..2f18e222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Preview.xml new file mode 100644 index 00000000..b5995343 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + + void + + int + + _value = value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Compatible.cs new file mode 100644 index 00000000..2f18e222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Compatible.xml new file mode 100644 index 00000000..b5995343 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + + void + + int + + _value = value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Default.cs new file mode 100644 index 00000000..2f18e222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Default.xml new file mode 100644 index 00000000..b5995343 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + + void + + int + + _value = value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Latest.cs new file mode 100644 index 00000000..2f18e222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Latest.xml new file mode 100644 index 00000000..b5995343 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + + void + + int + + _value = value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Preview.cs new file mode 100644 index 00000000..2f18e222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Preview.xml new file mode 100644 index 00000000..b5995343 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorTest.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + + void + + int + + _value = value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Compatible.cs new file mode 100644 index 00000000..f4ca52c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Compatible.xml new file mode 100644 index 00000000..8222ac99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Default.cs new file mode 100644 index 00000000..f4ca52c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Default.xml new file mode 100644 index 00000000..8222ac99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Latest.cs new file mode 100644 index 00000000..f4ca52c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Latest.xml new file mode 100644 index 00000000..8222ac99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Preview.cs new file mode 100644 index 00000000..f4ca52c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Preview.xml new file mode 100644 index 00000000..8222ac99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Compatible.cs new file mode 100644 index 00000000..f4ca52c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Compatible.xml new file mode 100644 index 00000000..8222ac99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Default.cs new file mode 100644 index 00000000..f4ca52c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Default.xml new file mode 100644 index 00000000..8222ac99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Latest.cs new file mode 100644 index 00000000..f4ca52c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Latest.xml new file mode 100644 index 00000000..8222ac99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Preview.cs new file mode 100644 index 00000000..f4ca52c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Preview.xml new file mode 100644 index 00000000..8222ac99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConstructorWithInitializeTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Compatible.cs new file mode 100644 index 00000000..52a4e137 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Compatible.cs @@ -0,0 +1,12 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public int value; + + public int ToInt32() + { + return value; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Compatible.xml new file mode 100644 index 00000000..815ef7d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Default.cs new file mode 100644 index 00000000..52a4e137 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Default.cs @@ -0,0 +1,12 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public int value; + + public int ToInt32() + { + return value; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Default.xml new file mode 100644 index 00000000..815ef7d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Latest.cs new file mode 100644 index 00000000..52a4e137 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Latest.cs @@ -0,0 +1,12 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public int value; + + public int ToInt32() + { + return value; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Latest.xml new file mode 100644 index 00000000..815ef7d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Preview.cs new file mode 100644 index 00000000..52a4e137 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Preview.cs @@ -0,0 +1,12 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public int value; + + public int ToInt32() + { + return value; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Preview.xml new file mode 100644 index 00000000..815ef7d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Compatible.cs new file mode 100644 index 00000000..52a4e137 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Compatible.cs @@ -0,0 +1,12 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public int value; + + public int ToInt32() + { + return value; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Compatible.xml new file mode 100644 index 00000000..815ef7d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Default.cs new file mode 100644 index 00000000..52a4e137 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Default.cs @@ -0,0 +1,12 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public int value; + + public int ToInt32() + { + return value; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Default.xml new file mode 100644 index 00000000..815ef7d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Latest.cs new file mode 100644 index 00000000..52a4e137 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Latest.cs @@ -0,0 +1,12 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public int value; + + public int ToInt32() + { + return value; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Latest.xml new file mode 100644 index 00000000..815ef7d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Preview.cs new file mode 100644 index 00000000..52a4e137 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Preview.cs @@ -0,0 +1,12 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public int value; + + public int ToInt32() + { + return value; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Preview.xml new file mode 100644 index 00000000..815ef7d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ConversionTest.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Compatible.cs new file mode 100644 index 00000000..c44dcce0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Compatible.xml new file mode 100644 index 00000000..b66bee16 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + int* + + MyStruct* + + + int* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Default.cs new file mode 100644 index 00000000..c44dcce0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Default.xml new file mode 100644 index 00000000..b66bee16 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + int* + + MyStruct* + + + int* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Latest.cs new file mode 100644 index 00000000..c44dcce0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Latest.xml new file mode 100644 index 00000000..b66bee16 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + int* + + MyStruct* + + + int* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Preview.cs new file mode 100644 index 00000000..c44dcce0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Preview.xml new file mode 100644 index 00000000..b66bee16 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + int* + + MyStruct* + + + int* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Compatible.cs new file mode 100644 index 00000000..11635723 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Compatible.xml new file mode 100644 index 00000000..412e9c2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + int* + + MyStruct* + + + int* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Default.cs new file mode 100644 index 00000000..11635723 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Default.xml new file mode 100644 index 00000000..412e9c2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + int* + + MyStruct* + + + int* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Latest.cs new file mode 100644 index 00000000..11635723 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Latest.xml new file mode 100644 index 00000000..412e9c2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + int* + + MyStruct* + + + int* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Preview.cs new file mode 100644 index 00000000..11635723 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Preview.xml new file mode 100644 index 00000000..412e9c2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DefaultParameterInheritedFromTemplateTest.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + int* + + MyStruct* + + + int* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Compatible.cs new file mode 100644 index 00000000..c7b76763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Compatible.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public void Dispose() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Compatible.xml new file mode 100644 index 00000000..9223ae48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Default.cs new file mode 100644 index 00000000..c7b76763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Default.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public void Dispose() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Default.xml new file mode 100644 index 00000000..9223ae48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Default.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Latest.cs new file mode 100644 index 00000000..c7b76763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Latest.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public void Dispose() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Latest.xml new file mode 100644 index 00000000..9223ae48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Latest.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Preview.cs new file mode 100644 index 00000000..c7b76763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Preview.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public void Dispose() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Preview.xml new file mode 100644 index 00000000..9223ae48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Unix.Preview.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Compatible.cs new file mode 100644 index 00000000..c7b76763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Compatible.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public void Dispose() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Compatible.xml new file mode 100644 index 00000000..9223ae48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Default.cs new file mode 100644 index 00000000..c7b76763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Default.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public void Dispose() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Default.xml new file mode 100644 index 00000000..9223ae48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Default.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Latest.cs new file mode 100644 index 00000000..c7b76763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Latest.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public void Dispose() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Latest.xml new file mode 100644 index 00000000..9223ae48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Latest.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Preview.cs new file mode 100644 index 00000000..c7b76763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Preview.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public void Dispose() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Preview.xml new file mode 100644 index 00000000..9223ae48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.DestructorTest.Windows.Preview.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Compatible.cs new file mode 100644 index 00000000..d1204429 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Compatible.xml new file mode 100644 index 00000000..c68a9c76 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + void + + MyStruct* + + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Default.cs new file mode 100644 index 00000000..d1204429 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Default.xml new file mode 100644 index 00000000..c68a9c76 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Default.xml @@ -0,0 +1,21 @@ + + + + + + void + + MyStruct* + + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Latest.cs new file mode 100644 index 00000000..d1204429 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Latest.xml new file mode 100644 index 00000000..c68a9c76 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + void + + MyStruct* + + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Preview.cs new file mode 100644 index 00000000..d1204429 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Preview.xml new file mode 100644 index 00000000..c68a9c76 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + void + + MyStruct* + + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Compatible.cs new file mode 100644 index 00000000..da8c52c6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Compatible.xml new file mode 100644 index 00000000..f874b78c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + void + + MyStruct* + + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Default.cs new file mode 100644 index 00000000..da8c52c6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Default.xml new file mode 100644 index 00000000..f874b78c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Default.xml @@ -0,0 +1,21 @@ + + + + + + void + + MyStruct* + + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Latest.cs new file mode 100644 index 00000000..da8c52c6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Latest.xml new file mode 100644 index 00000000..f874b78c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + void + + MyStruct* + + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Preview.cs new file mode 100644 index 00000000..da8c52c6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Preview.xml new file mode 100644 index 00000000..f874b78c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.InstanceTest.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + void + + MyStruct* + + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Compatible.cs new file mode 100644 index 00000000..23d2e43e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Compatible.xml new file mode 100644 index 00000000..9bc0af1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Compatible.xml @@ -0,0 +1,23 @@ + + + + + + byte* + + + int + + + + + int + + void* + + ((context_t*)(pContext))->buf = null; + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Default.cs new file mode 100644 index 00000000..23d2e43e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Default.xml new file mode 100644 index 00000000..9bc0af1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Default.xml @@ -0,0 +1,23 @@ + + + + + + byte* + + + int + + + + + int + + void* + + ((context_t*)(pContext))->buf = null; + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Latest.cs new file mode 100644 index 00000000..23d2e43e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Latest.xml new file mode 100644 index 00000000..9bc0af1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Latest.xml @@ -0,0 +1,23 @@ + + + + + + byte* + + + int + + + + + int + + void* + + ((context_t*)(pContext))->buf = null; + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Preview.cs new file mode 100644 index 00000000..23d2e43e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Preview.xml new file mode 100644 index 00000000..9bc0af1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Unix.Preview.xml @@ -0,0 +1,23 @@ + + + + + + byte* + + + int + + + + + int + + void* + + ((context_t*)(pContext))->buf = null; + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Compatible.cs new file mode 100644 index 00000000..23d2e43e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Compatible.xml new file mode 100644 index 00000000..9bc0af1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Compatible.xml @@ -0,0 +1,23 @@ + + + + + + byte* + + + int + + + + + int + + void* + + ((context_t*)(pContext))->buf = null; + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Default.cs new file mode 100644 index 00000000..23d2e43e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Default.xml new file mode 100644 index 00000000..9bc0af1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Default.xml @@ -0,0 +1,23 @@ + + + + + + byte* + + + int + + + + + int + + void* + + ((context_t*)(pContext))->buf = null; + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Latest.cs new file mode 100644 index 00000000..23d2e43e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Latest.xml new file mode 100644 index 00000000..9bc0af1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Latest.xml @@ -0,0 +1,23 @@ + + + + + + byte* + + + int + + + + + int + + void* + + ((context_t*)(pContext))->buf = null; + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Preview.cs new file mode 100644 index 00000000..23d2e43e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Preview.xml new file mode 100644 index 00000000..9bc0af1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MacrosExpansionTest.Windows.Preview.xml @@ -0,0 +1,23 @@ + + + + + + byte* + + + int + + + + + int + + void* + + ((context_t*)(pContext))->buf = null; + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Compatible.cs new file mode 100644 index 00000000..f8d3c170 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Compatible.xml new file mode 100644 index 00000000..84cbc6a0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Default.cs new file mode 100644 index 00000000..f8d3c170 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Default.xml new file mode 100644 index 00000000..84cbc6a0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Latest.cs new file mode 100644 index 00000000..f8d3c170 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Latest.xml new file mode 100644 index 00000000..84cbc6a0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Preview.cs new file mode 100644 index 00000000..f8d3c170 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Preview.xml new file mode 100644 index 00000000..84cbc6a0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Compatible.cs new file mode 100644 index 00000000..f8d3c170 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Compatible.xml new file mode 100644 index 00000000..84cbc6a0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Default.cs new file mode 100644 index 00000000..f8d3c170 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Default.xml new file mode 100644 index 00000000..84cbc6a0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Latest.cs new file mode 100644 index 00000000..f8d3c170 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Latest.xml new file mode 100644 index 00000000..84cbc6a0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Preview.cs new file mode 100644 index 00000000..f8d3c170 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Preview.xml new file mode 100644 index 00000000..84cbc6a0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberCallTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Compatible.cs new file mode 100644 index 00000000..74115c12 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Compatible.xml new file mode 100644 index 00000000..c0c48e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Default.cs new file mode 100644 index 00000000..74115c12 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Default.xml new file mode 100644 index 00000000..c0c48e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Latest.cs new file mode 100644 index 00000000..74115c12 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Latest.xml new file mode 100644 index 00000000..c0c48e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Preview.cs new file mode 100644 index 00000000..74115c12 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Preview.xml new file mode 100644 index 00000000..c0c48e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Compatible.cs new file mode 100644 index 00000000..74115c12 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Compatible.xml new file mode 100644 index 00000000..c0c48e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Default.cs new file mode 100644 index 00000000..74115c12 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Default.xml new file mode 100644 index 00000000..c0c48e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Latest.cs new file mode 100644 index 00000000..74115c12 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Latest.xml new file mode 100644 index 00000000..c0c48e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Preview.cs new file mode 100644 index 00000000..74115c12 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Preview.xml new file mode 100644 index 00000000..c0c48e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.MemberTest.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Compatible.cs new file mode 100644 index 00000000..790dfed4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Compatible.xml new file mode 100644 index 00000000..bdfd1a3b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Default.cs new file mode 100644 index 00000000..790dfed4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Default.xml new file mode 100644 index 00000000..bdfd1a3b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Latest.cs new file mode 100644 index 00000000..790dfed4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Latest.xml new file mode 100644 index 00000000..bdfd1a3b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Preview.cs new file mode 100644 index 00000000..790dfed4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Preview.xml new file mode 100644 index 00000000..bdfd1a3b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Compatible.cs new file mode 100644 index 00000000..790dfed4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Compatible.xml new file mode 100644 index 00000000..bdfd1a3b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Default.cs new file mode 100644 index 00000000..790dfed4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Default.xml new file mode 100644 index 00000000..bdfd1a3b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Latest.cs new file mode 100644 index 00000000..790dfed4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Latest.xml new file mode 100644 index 00000000..bdfd1a3b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Preview.cs new file mode 100644 index 00000000..790dfed4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Preview.xml new file mode 100644 index 00000000..bdfd1a3b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Compatible.cs new file mode 100644 index 00000000..c6947a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Compatible.xml new file mode 100644 index 00000000..7a0438cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Default.cs new file mode 100644 index 00000000..43e838c8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Default.xml new file mode 100644 index 00000000..00072249 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Latest.cs new file mode 100644 index 00000000..43e838c8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Latest.xml new file mode 100644 index 00000000..00072249 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Preview.cs new file mode 100644 index 00000000..43e838c8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Preview.xml new file mode 100644 index 00000000..00072249 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Compatible.cs new file mode 100644 index 00000000..6333da6b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Compatible.xml new file mode 100644 index 00000000..f5e1b276 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Default.cs new file mode 100644 index 00000000..c6a33d7d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Default.xml new file mode 100644 index 00000000..b7ebefa1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Latest.cs new file mode 100644 index 00000000..c6a33d7d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Latest.xml new file mode 100644 index 00000000..b7ebefa1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Preview.cs new file mode 100644 index 00000000..c6a33d7d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Preview.xml new file mode 100644 index 00000000..b7ebefa1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Compatible.cs new file mode 100644 index 00000000..ad6830b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Compatible.xml new file mode 100644 index 00000000..31299001 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Default.cs new file mode 100644 index 00000000..fda26b8b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Default.xml new file mode 100644 index 00000000..b9518f46 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Latest.cs new file mode 100644 index 00000000..fda26b8b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Latest.xml new file mode 100644 index 00000000..b9518f46 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Preview.cs new file mode 100644 index 00000000..fda26b8b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Preview.xml new file mode 100644 index 00000000..b9518f46 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Compatible.cs new file mode 100644 index 00000000..ba92ce4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Compatible.xml new file mode 100644 index 00000000..5525d021 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Default.cs new file mode 100644 index 00000000..0e94284a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Default.xml new file mode 100644 index 00000000..273c686f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Latest.cs new file mode 100644 index 00000000..0e94284a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Latest.xml new file mode 100644 index 00000000..273c686f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Preview.cs new file mode 100644 index 00000000..0e94284a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Preview.xml new file mode 100644 index 00000000..273c686f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Compatible.cs new file mode 100644 index 00000000..ef063190 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Compatible.xml new file mode 100644 index 00000000..399f4fe7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Default.cs new file mode 100644 index 00000000..6f5663c8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Default.xml new file mode 100644 index 00000000..bcdcff1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Latest.cs new file mode 100644 index 00000000..6f5663c8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Latest.xml new file mode 100644 index 00000000..bcdcff1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Preview.cs new file mode 100644 index 00000000..6f5663c8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Preview.xml new file mode 100644 index 00000000..bcdcff1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Compatible.cs new file mode 100644 index 00000000..b8150a37 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Compatible.xml new file mode 100644 index 00000000..71b122fb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Default.cs new file mode 100644 index 00000000..15da4204 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Default.xml new file mode 100644 index 00000000..3ff74f5e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Latest.cs new file mode 100644 index 00000000..15da4204 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Latest.xml new file mode 100644 index 00000000..3ff74f5e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Preview.cs new file mode 100644 index 00000000..15da4204 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Preview.xml new file mode 100644 index 00000000..3ff74f5e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.NewKeywordVirtualWithExplicitVtblTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Compatible.cs new file mode 100644 index 00000000..f2da1d51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Compatible.xml new file mode 100644 index 00000000..f41d5272 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Default.cs new file mode 100644 index 00000000..f2da1d51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Default.xml new file mode 100644 index 00000000..f41d5272 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Latest.cs new file mode 100644 index 00000000..f2da1d51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Latest.xml new file mode 100644 index 00000000..f41d5272 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Preview.cs new file mode 100644 index 00000000..f2da1d51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Preview.xml new file mode 100644 index 00000000..f41d5272 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Compatible.cs new file mode 100644 index 00000000..f2da1d51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Compatible.xml new file mode 100644 index 00000000..f41d5272 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Default.cs new file mode 100644 index 00000000..f2da1d51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Default.xml new file mode 100644 index 00000000..f41d5272 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Latest.cs new file mode 100644 index 00000000..f2da1d51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Latest.xml new file mode 100644 index 00000000..f41d5272 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Preview.cs new file mode 100644 index 00000000..f2da1d51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Preview.xml new file mode 100644 index 00000000..f41d5272 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorCallTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Compatible.cs new file mode 100644 index 00000000..dcdc3cbd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Compatible.xml new file mode 100644 index 00000000..1f20f49b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Default.cs new file mode 100644 index 00000000..dcdc3cbd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Default.xml new file mode 100644 index 00000000..1f20f49b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Latest.cs new file mode 100644 index 00000000..dcdc3cbd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Latest.xml new file mode 100644 index 00000000..1f20f49b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Preview.cs new file mode 100644 index 00000000..dcdc3cbd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Preview.xml new file mode 100644 index 00000000..1f20f49b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Compatible.cs new file mode 100644 index 00000000..dcdc3cbd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Compatible.xml new file mode 100644 index 00000000..1f20f49b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Default.cs new file mode 100644 index 00000000..dcdc3cbd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Default.xml new file mode 100644 index 00000000..1f20f49b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Latest.cs new file mode 100644 index 00000000..dcdc3cbd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Latest.xml new file mode 100644 index 00000000..1f20f49b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Preview.cs new file mode 100644 index 00000000..dcdc3cbd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Preview.xml new file mode 100644 index 00000000..1f20f49b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.OperatorTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Compatible.cs new file mode 100644 index 00000000..153b9444 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Compatible.xml new file mode 100644 index 00000000..5bd1174c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Compatible.xml @@ -0,0 +1,18 @@ + + + + + + void + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Default.cs new file mode 100644 index 00000000..153b9444 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Default.xml new file mode 100644 index 00000000..5bd1174c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Default.xml @@ -0,0 +1,18 @@ + + + + + + void + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Latest.cs new file mode 100644 index 00000000..153b9444 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Latest.xml new file mode 100644 index 00000000..5bd1174c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Latest.xml @@ -0,0 +1,18 @@ + + + + + + void + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Preview.cs new file mode 100644 index 00000000..153b9444 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Preview.xml new file mode 100644 index 00000000..5bd1174c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Unix.Preview.xml @@ -0,0 +1,18 @@ + + + + + + void + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Compatible.cs new file mode 100644 index 00000000..81ad1ea6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Compatible.xml new file mode 100644 index 00000000..699c4410 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Compatible.xml @@ -0,0 +1,18 @@ + + + + + + void + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Default.cs new file mode 100644 index 00000000..81ad1ea6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Default.xml new file mode 100644 index 00000000..699c4410 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Default.xml @@ -0,0 +1,18 @@ + + + + + + void + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Latest.cs new file mode 100644 index 00000000..81ad1ea6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Latest.xml new file mode 100644 index 00000000..699c4410 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Latest.xml @@ -0,0 +1,18 @@ + + + + + + void + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Preview.cs new file mode 100644 index 00000000..81ad1ea6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Preview.xml new file mode 100644 index 00000000..699c4410 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.StaticTest.Windows.Preview.xml @@ -0,0 +1,18 @@ + + + + + + void + + + int + return 0; + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Compatible.cs new file mode 100644 index 00000000..4fc497af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Compatible.xml new file mode 100644 index 00000000..6cf6eb53 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return this.value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Default.cs new file mode 100644 index 00000000..4fc497af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Default.xml new file mode 100644 index 00000000..6cf6eb53 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return this.value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Latest.cs new file mode 100644 index 00000000..4fc497af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Latest.xml new file mode 100644 index 00000000..6cf6eb53 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return this.value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Preview.cs new file mode 100644 index 00000000..4fc497af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Preview.xml new file mode 100644 index 00000000..6cf6eb53 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return this.value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Compatible.cs new file mode 100644 index 00000000..4fc497af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Compatible.xml new file mode 100644 index 00000000..6cf6eb53 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return this.value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Default.cs new file mode 100644 index 00000000..4fc497af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Default.xml new file mode 100644 index 00000000..6cf6eb53 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return this.value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Latest.cs new file mode 100644 index 00000000..4fc497af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Latest.xml new file mode 100644 index 00000000..6cf6eb53 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return this.value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Preview.cs new file mode 100644 index 00000000..4fc497af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Preview.xml new file mode 100644 index 00000000..6cf6eb53 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.ThisTest.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + + int + return this.value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Compatible.cs new file mode 100644 index 00000000..109086f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Compatible.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/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Compatible.xml new file mode 100644 index 00000000..339db33f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void* + return null; + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Default.cs new file mode 100644 index 00000000..109086f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Default.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/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Default.xml new file mode 100644 index 00000000..339db33f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + void* + return null; + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Latest.cs new file mode 100644 index 00000000..109086f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Latest.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/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Latest.xml new file mode 100644 index 00000000..339db33f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void* + return null; + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Preview.cs new file mode 100644 index 00000000..109086f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Preview.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/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Preview.xml new file mode 100644 index 00000000..339db33f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void* + return null; + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Compatible.cs new file mode 100644 index 00000000..109086f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Compatible.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/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Compatible.xml new file mode 100644 index 00000000..339db33f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void* + return null; + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Default.cs new file mode 100644 index 00000000..109086f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Default.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/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Default.xml new file mode 100644 index 00000000..339db33f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + void* + return null; + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Latest.cs new file mode 100644 index 00000000..109086f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Latest.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/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Latest.xml new file mode 100644 index 00000000..339db33f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void* + return null; + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Preview.cs new file mode 100644 index 00000000..109086f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Preview.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/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Preview.xml new file mode 100644 index 00000000..339db33f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.UnsafeDoesNotImpactDllImportTest.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void* + return null; + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Compatible.cs new file mode 100644 index 00000000..94b339ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.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("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("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/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Compatible.xml new file mode 100644 index 00000000..76e9c244 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.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/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Default.cs new file mode 100644 index 00000000..aa77bd09 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.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("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/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Default.xml new file mode 100644 index 00000000..5106be8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.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/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Latest.cs new file mode 100644 index 00000000..aa77bd09 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.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("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/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Latest.xml new file mode 100644 index 00000000..5106be8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.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/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Preview.cs new file mode 100644 index 00000000..aa77bd09 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.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("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/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.Preview.xml new file mode 100644 index 00000000..5106be8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Unix.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/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Compatible.cs new file mode 100644 index 00000000..94b339ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.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("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("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/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Compatible.xml new file mode 100644 index 00000000..76e9c244 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.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/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Default.cs new file mode 100644 index 00000000..aa77bd09 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.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("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/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Default.xml new file mode 100644 index 00000000..5106be8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.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/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Latest.cs new file mode 100644 index 00000000..aa77bd09 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.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("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/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Latest.xml new file mode 100644 index 00000000..5106be8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.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/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Preview.cs new file mode 100644 index 00000000..aa77bd09 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.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("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/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.Preview.xml new file mode 100644 index 00000000..5106be8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualTest.Windows.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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Compatible.cs new file mode 100644 index 00000000..9d63edf1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.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("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("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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Compatible.xml new file mode 100644 index 00000000..7e8898ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Default.cs new file mode 100644 index 00000000..a89e49fc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.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("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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Default.xml new file mode 100644 index 00000000..9c26bf98 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Latest.cs new file mode 100644 index 00000000..a89e49fc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.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("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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Latest.xml new file mode 100644 index 00000000..9c26bf98 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Preview.cs new file mode 100644 index 00000000..a89e49fc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.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("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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.Preview.xml new file mode 100644 index 00000000..9c26bf98 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Unix.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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Compatible.cs new file mode 100644 index 00000000..9d63edf1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.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("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("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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Compatible.xml new file mode 100644 index 00000000..7e8898ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Default.cs new file mode 100644 index 00000000..a89e49fc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.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("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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Default.xml new file mode 100644 index 00000000..9c26bf98 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Latest.cs new file mode 100644 index 00000000..a89e49fc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.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("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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Latest.xml new file mode 100644 index 00000000..9c26bf98 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Preview.cs new file mode 100644 index 00000000..a89e49fc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.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("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/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.Preview.xml new file mode 100644 index 00000000..9c26bf98 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/CXXMethodDeclarationTest.VirtualWithVtblIndexAttributeTest.Windows.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Compatible.cs new file mode 100644 index 00000000..bff18e4a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Compatible.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Compatible.xml new file mode 100644 index 00000000..ed2eb06b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Compatible.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Default.cs new file mode 100644 index 00000000..bff18e4a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Default.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Default.xml new file mode 100644 index 00000000..ed2eb06b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Default.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Latest.cs new file mode 100644 index 00000000..bff18e4a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Latest.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Latest.xml new file mode 100644 index 00000000..ed2eb06b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Latest.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Preview.cs new file mode 100644 index 00000000..bff18e4a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Preview.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Preview.xml new file mode 100644 index 00000000..ed2eb06b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Unix.Preview.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Compatible.cs new file mode 100644 index 00000000..bff18e4a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Compatible.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Compatible.xml new file mode 100644 index 00000000..ed2eb06b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Compatible.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Default.cs new file mode 100644 index 00000000..bff18e4a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Default.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Default.xml new file mode 100644 index 00000000..ed2eb06b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Default.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Latest.cs new file mode 100644 index 00000000..bff18e4a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Latest.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Latest.xml new file mode 100644 index 00000000..ed2eb06b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Latest.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Preview.cs new file mode 100644 index 00000000..bff18e4a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Preview.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/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Preview.xml new file mode 100644 index 00000000..ed2eb06b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.EnumDecl.Windows.Preview.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/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Compatible.cs new file mode 100644 index 00000000..c5e4704b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Compatible.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/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Compatible.xml new file mode 100644 index 00000000..e4cf47e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Compatible.xml @@ -0,0 +1,25 @@ + + + + + + void + + + + Obsolete + void + + + + Obsolete("This is obsolete.") + void + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Default.cs new file mode 100644 index 00000000..c5e4704b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Default.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/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Default.xml new file mode 100644 index 00000000..e4cf47e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Default.xml @@ -0,0 +1,25 @@ + + + + + + void + + + + Obsolete + void + + + + Obsolete("This is obsolete.") + void + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Latest.cs new file mode 100644 index 00000000..c5e4704b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Latest.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/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Latest.xml new file mode 100644 index 00000000..e4cf47e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Latest.xml @@ -0,0 +1,25 @@ + + + + + + void + + + + Obsolete + void + + + + Obsolete("This is obsolete.") + void + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Preview.cs new file mode 100644 index 00000000..c5e4704b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Preview.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/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Preview.xml new file mode 100644 index 00000000..e4cf47e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Unix.Preview.xml @@ -0,0 +1,25 @@ + + + + + + void + + + + Obsolete + void + + + + Obsolete("This is obsolete.") + void + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Compatible.cs new file mode 100644 index 00000000..c5e4704b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Compatible.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/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Compatible.xml new file mode 100644 index 00000000..e4cf47e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Compatible.xml @@ -0,0 +1,25 @@ + + + + + + void + + + + Obsolete + void + + + + Obsolete("This is obsolete.") + void + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Default.cs new file mode 100644 index 00000000..c5e4704b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Default.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/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Default.xml new file mode 100644 index 00000000..e4cf47e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Default.xml @@ -0,0 +1,25 @@ + + + + + + void + + + + Obsolete + void + + + + Obsolete("This is obsolete.") + void + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Latest.cs new file mode 100644 index 00000000..c5e4704b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Latest.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/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Latest.xml new file mode 100644 index 00000000..e4cf47e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Latest.xml @@ -0,0 +1,25 @@ + + + + + + void + + + + Obsolete + void + + + + Obsolete("This is obsolete.") + void + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Preview.cs new file mode 100644 index 00000000..c5e4704b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Preview.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/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Preview.xml new file mode 100644 index 00000000..e4cf47e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDecl.Windows.Preview.xml @@ -0,0 +1,25 @@ + + + + + + void + + + + Obsolete + void + + + + Obsolete("This is obsolete.") + void + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Compatible.cs new file mode 100644 index 00000000..896dacec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Compatible.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/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Compatible.xml new file mode 100644 index 00000000..578c0cc6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + void + + + Obsolete + void + + + Obsolete("This is obsolete.") + void + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Default.cs new file mode 100644 index 00000000..896dacec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Default.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/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Default.xml new file mode 100644 index 00000000..578c0cc6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Default.xml @@ -0,0 +1,21 @@ + + + + + + void + + + Obsolete + void + + + Obsolete("This is obsolete.") + void + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Latest.cs new file mode 100644 index 00000000..896dacec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Latest.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/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Latest.xml new file mode 100644 index 00000000..578c0cc6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + void + + + Obsolete + void + + + Obsolete("This is obsolete.") + void + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Preview.cs new file mode 100644 index 00000000..896dacec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Preview.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/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Preview.xml new file mode 100644 index 00000000..578c0cc6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + void + + + Obsolete + void + + + Obsolete("This is obsolete.") + void + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Compatible.cs new file mode 100644 index 00000000..896dacec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Compatible.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/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Compatible.xml new file mode 100644 index 00000000..578c0cc6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + void + + + Obsolete + void + + + Obsolete("This is obsolete.") + void + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Default.cs new file mode 100644 index 00000000..896dacec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Default.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/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Default.xml new file mode 100644 index 00000000..578c0cc6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Default.xml @@ -0,0 +1,21 @@ + + + + + + void + + + Obsolete + void + + + Obsolete("This is obsolete.") + void + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Latest.cs new file mode 100644 index 00000000..896dacec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Latest.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/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Latest.xml new file mode 100644 index 00000000..578c0cc6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + void + + + Obsolete + void + + + Obsolete("This is obsolete.") + void + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Preview.cs new file mode 100644 index 00000000..896dacec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Preview.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/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Preview.xml new file mode 100644 index 00000000..578c0cc6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncDllImport.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + void + + + Obsolete + void + + + Obsolete("This is obsolete.") + void + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Compatible.cs new file mode 100644 index 00000000..00b40b30 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.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/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Compatible.xml new file mode 100644 index 00000000..c3355605 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.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/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Default.cs new file mode 100644 index 00000000..75bb08ee --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.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/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Default.xml new file mode 100644 index 00000000..a3961046 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.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/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Latest.cs new file mode 100644 index 00000000..75bb08ee --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.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/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Latest.xml new file mode 100644 index 00000000..a3961046 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.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/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Preview.cs new file mode 100644 index 00000000..75bb08ee --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.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/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.Preview.xml new file mode 100644 index 00000000..a3961046 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Unix.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/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Compatible.cs new file mode 100644 index 00000000..00b40b30 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.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/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Compatible.xml new file mode 100644 index 00000000..c3355605 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.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/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Default.cs new file mode 100644 index 00000000..75bb08ee --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.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/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Default.xml new file mode 100644 index 00000000..a3961046 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.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/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Latest.cs new file mode 100644 index 00000000..75bb08ee --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.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/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Latest.xml new file mode 100644 index 00000000..a3961046 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.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/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Preview.cs new file mode 100644 index 00000000..75bb08ee --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.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/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.Preview.xml new file mode 100644 index 00000000..a3961046 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.FuncPtrDecl.Windows.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Compatible.cs new file mode 100644 index 00000000..d98eec88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Compatible.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Compatible.xml new file mode 100644 index 00000000..31012923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Compatible.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Default.cs new file mode 100644 index 00000000..d98eec88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Default.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Default.xml new file mode 100644 index 00000000..31012923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Default.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Latest.cs new file mode 100644 index 00000000..d98eec88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Latest.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Latest.xml new file mode 100644 index 00000000..31012923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Latest.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Preview.cs new file mode 100644 index 00000000..d98eec88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Preview.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Preview.xml new file mode 100644 index 00000000..31012923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Unix.Preview.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Compatible.cs new file mode 100644 index 00000000..d98eec88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Compatible.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Compatible.xml new file mode 100644 index 00000000..31012923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Compatible.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Default.cs new file mode 100644 index 00000000..d98eec88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Default.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Default.xml new file mode 100644 index 00000000..31012923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Default.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Latest.cs new file mode 100644 index 00000000..d98eec88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Latest.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Latest.xml new file mode 100644 index 00000000..31012923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Latest.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Preview.cs new file mode 100644 index 00000000..d98eec88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Preview.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/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Preview.xml new file mode 100644 index 00000000..31012923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.InstanceFunc.Windows.Preview.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/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Compatible.cs new file mode 100644 index 00000000..6da00c2a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Compatible.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/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Compatible.xml new file mode 100644 index 00000000..f2a7a5db --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Compatible.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Default.cs new file mode 100644 index 00000000..6da00c2a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Default.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/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Default.xml new file mode 100644 index 00000000..f2a7a5db --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Default.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Latest.cs new file mode 100644 index 00000000..6da00c2a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Latest.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/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Latest.xml new file mode 100644 index 00000000..f2a7a5db --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Latest.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Preview.cs new file mode 100644 index 00000000..6da00c2a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Preview.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/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Preview.xml new file mode 100644 index 00000000..f2a7a5db --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Unix.Preview.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Compatible.cs new file mode 100644 index 00000000..6da00c2a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Compatible.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/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Compatible.xml new file mode 100644 index 00000000..f2a7a5db --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Compatible.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Default.cs new file mode 100644 index 00000000..6da00c2a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Default.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/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Default.xml new file mode 100644 index 00000000..f2a7a5db --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Default.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Latest.cs new file mode 100644 index 00000000..6da00c2a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Latest.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/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Latest.xml new file mode 100644 index 00000000..f2a7a5db --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Latest.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Preview.cs new file mode 100644 index 00000000..6da00c2a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Preview.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/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Preview.xml new file mode 100644 index 00000000..f2a7a5db --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleEnumMembers.Windows.Preview.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Compatible.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Compatible.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/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Compatible.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Default.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Default.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/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Default.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Default.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Latest.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Latest.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/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Latest.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Preview.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Preview.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/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Preview.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Compatible.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Compatible.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/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Compatible.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Default.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Default.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/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Default.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Default.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Latest.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Latest.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/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Latest.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Preview.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Preview.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/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Preview.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleStructMembers.int.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Compatible.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Compatible.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/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Compatible.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Default.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Default.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/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Default.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Default.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Latest.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Latest.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/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Latest.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Preview.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Preview.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/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Preview.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Compatible.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Compatible.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/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Compatible.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Default.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Default.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/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Default.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Default.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Latest.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Latest.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/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Latest.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Preview.cs new file mode 100644 index 00000000..405acaa7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Preview.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/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Preview.xml new file mode 100644 index 00000000..62451fd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleTypedefStructMembers.int.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + Obsolete + int + + + Obsolete("This is obsolete.") + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Compatible.cs new file mode 100644 index 00000000..34fffe69 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Compatible.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/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Compatible.xml new file mode 100644 index 00000000..f830a1f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Compatible.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/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Default.cs new file mode 100644 index 00000000..34fffe69 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Default.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/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Default.xml new file mode 100644 index 00000000..f830a1f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Default.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/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Latest.cs new file mode 100644 index 00000000..34fffe69 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Latest.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/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Latest.xml new file mode 100644 index 00000000..f830a1f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Latest.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/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Preview.cs new file mode 100644 index 00000000..34fffe69 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Preview.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/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Preview.xml new file mode 100644 index 00000000..f830a1f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Unix.Preview.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/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Compatible.cs new file mode 100644 index 00000000..34fffe69 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Compatible.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/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Compatible.xml new file mode 100644 index 00000000..f830a1f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Compatible.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/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Default.cs new file mode 100644 index 00000000..34fffe69 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Default.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/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Default.xml new file mode 100644 index 00000000..f830a1f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Default.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/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Latest.cs new file mode 100644 index 00000000..34fffe69 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Latest.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/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Latest.xml new file mode 100644 index 00000000..f830a1f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Latest.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/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Preview.cs new file mode 100644 index 00000000..34fffe69 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Preview.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/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Preview.xml new file mode 100644 index 00000000..f830a1f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.SimpleVarDecl.int.Windows.Preview.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/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Compatible.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Compatible.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/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Compatible.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Compatible.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Default.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Default.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/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Default.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Default.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Latest.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Latest.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/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Latest.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Latest.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Preview.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Preview.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/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Preview.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Unix.Preview.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Compatible.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Compatible.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/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Compatible.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Compatible.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Default.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Default.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/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Default.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Default.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Latest.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Latest.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/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Latest.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Latest.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Preview.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Preview.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/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Preview.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.StructDecl.Windows.Preview.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Compatible.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Compatible.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/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Compatible.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Compatible.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Default.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Default.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/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Default.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Default.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Latest.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Latest.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/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Latest.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Latest.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Preview.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Preview.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/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Preview.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Unix.Preview.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Compatible.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Compatible.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/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Compatible.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Compatible.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Default.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Default.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/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Default.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Default.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Latest.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Latest.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/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Latest.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Latest.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Preview.cs new file mode 100644 index 00000000..faeadf2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Preview.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/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Preview.xml new file mode 100644 index 00000000..ffa4d12c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/DeprecatedToObsoleteTest.TypedefStructDecl.Windows.Preview.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + Obsolete + + int + + + + Obsolete("This is obsolete.") + + int + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Compatible.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Compatible.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Compatible.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Default.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Default.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Default.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Latest.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Latest.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Latest.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Preview.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Preview.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Preview.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Compatible.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Compatible.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Compatible.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Default.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Default.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Default.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Latest.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Latest.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Latest.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Preview.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Preview.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Preview.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicTest.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Compatible.cs new file mode 100644 index 00000000..a2b01b2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Compatible.xml new file mode 100644 index 00000000..05fb68d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Compatible.xml @@ -0,0 +1,20 @@ + + + + + int + + int + + 1 + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Default.cs new file mode 100644 index 00000000..a2b01b2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Default.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/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Default.xml new file mode 100644 index 00000000..05fb68d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Default.xml @@ -0,0 +1,20 @@ + + + + + int + + int + + 1 + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Latest.cs new file mode 100644 index 00000000..a2b01b2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Latest.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/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Latest.xml new file mode 100644 index 00000000..05fb68d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Latest.xml @@ -0,0 +1,20 @@ + + + + + int + + int + + 1 + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Preview.cs new file mode 100644 index 00000000..a2b01b2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Preview.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/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Preview.xml new file mode 100644 index 00000000..05fb68d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Unix.Preview.xml @@ -0,0 +1,20 @@ + + + + + int + + int + + 1 + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Compatible.cs new file mode 100644 index 00000000..a2b01b2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Compatible.xml new file mode 100644 index 00000000..05fb68d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Compatible.xml @@ -0,0 +1,20 @@ + + + + + int + + int + + 1 + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Default.cs new file mode 100644 index 00000000..a2b01b2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Default.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/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Default.xml new file mode 100644 index 00000000..05fb68d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Default.xml @@ -0,0 +1,20 @@ + + + + + int + + int + + 1 + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Latest.cs new file mode 100644 index 00000000..a2b01b2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Latest.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/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Latest.xml new file mode 100644 index 00000000..05fb68d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Latest.xml @@ -0,0 +1,20 @@ + + + + + int + + int + + 1 + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Preview.cs new file mode 100644 index 00000000..a2b01b2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Preview.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/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Preview.xml new file mode 100644 index 00000000..05fb68d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.BasicValueTest.Windows.Preview.xml @@ -0,0 +1,20 @@ + + + + + int + + int + + 1 + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Unix.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExcludeTest.Windows.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Compatible.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Default.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Default.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Default.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Latest.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Latest.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Latest.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Preview.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Preview.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Preview.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Compatible.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Default.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Default.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Default.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Latest.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Latest.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Latest.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Preview.cs new file mode 100644 index 00000000..2fdb2f06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Preview.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public enum MyEnum + { + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Preview.xml new file mode 100644 index 00000000..f9df59a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.int.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Default.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Default.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Default.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Default.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.long long.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..39444ef2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..37f04fdc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + short + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Default.cs new file mode 100644 index 00000000..39444ef2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Default.xml new file mode 100644 index 00000000..37f04fdc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + short + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Latest.cs new file mode 100644 index 00000000..39444ef2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Latest.xml new file mode 100644 index 00000000..37f04fdc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + short + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Preview.cs new file mode 100644 index 00000000..39444ef2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Preview.xml new file mode 100644 index 00000000..37f04fdc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + short + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..39444ef2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..37f04fdc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + short + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Default.cs new file mode 100644 index 00000000..39444ef2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Default.xml new file mode 100644 index 00000000..37f04fdc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + short + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Latest.cs new file mode 100644 index 00000000..39444ef2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Latest.xml new file mode 100644 index 00000000..37f04fdc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + short + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Preview.cs new file mode 100644 index 00000000..39444ef2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Preview.xml new file mode 100644 index 00000000..37f04fdc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.short.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + short + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Compatible.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Compatible.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Default.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Default.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Latest.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Latest.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Preview.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Preview.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Compatible.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Compatible.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Default.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Default.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Latest.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Latest.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Preview.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Preview.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedTest.unsigned.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Default.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Default.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Default.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Default.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..016fbc5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..599d4877 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.long long.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + long + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..468387f1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..d14a1566 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + sbyte + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..468387f1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..d14a1566 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + sbyte + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..468387f1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..d14a1566 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + sbyte + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..468387f1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..d14a1566 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + sbyte + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..468387f1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..d14a1566 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + sbyte + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..468387f1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..d14a1566 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + sbyte + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..468387f1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..d14a1566 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + sbyte + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..468387f1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..d14a1566 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.signed char.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + sbyte + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..14cacb0b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..f63a4d86 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + byte + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..14cacb0b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..f63a4d86 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + byte + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..14cacb0b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..f63a4d86 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + byte + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..14cacb0b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..f63a4d86 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + byte + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..14cacb0b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..f63a4d86 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + byte + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..14cacb0b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..f63a4d86 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + byte + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..14cacb0b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..f63a4d86 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + byte + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..14cacb0b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..f63a4d86 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + byte + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..0ed5362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..9863a1d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..61d3c28b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + ulong + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..9863a1d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..61d3c28b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + ulong + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..9863a1d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..61d3c28b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + ulong + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..9863a1d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..61d3c28b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + ulong + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..9863a1d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..61d3c28b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + ulong + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..9863a1d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..61d3c28b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + ulong + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..9863a1d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..61d3c28b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + ulong + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..9863a1d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..61d3c28b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + ulong + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..afca334d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..488775b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + ushort + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..afca334d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..488775b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + ushort + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..afca334d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..488775b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + ushort + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..afca334d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..488775b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + ushort + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..afca334d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Compatible.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..488775b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + ushort + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..afca334d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Default.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..488775b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + ushort + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..afca334d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Latest.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..488775b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + ushort + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..afca334d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Preview.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/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..488775b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.ExplicitTypedWithNativeTypeNameTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + ushort + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Compatible.cs new file mode 100644 index 00000000..f4629b97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.RemapTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Compatible.xml new file mode 100644 index 00000000..df2395fc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.RemapTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Default.cs new file mode 100644 index 00000000..f4629b97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Default.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/Baselines/EnumDeclarationTest.RemapTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Default.xml new file mode 100644 index 00000000..df2395fc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Default.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/Baselines/EnumDeclarationTest.RemapTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Latest.cs new file mode 100644 index 00000000..f4629b97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Latest.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/Baselines/EnumDeclarationTest.RemapTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Latest.xml new file mode 100644 index 00000000..df2395fc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Latest.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/Baselines/EnumDeclarationTest.RemapTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Preview.cs new file mode 100644 index 00000000..f4629b97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Preview.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/Baselines/EnumDeclarationTest.RemapTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Preview.xml new file mode 100644 index 00000000..df2395fc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Unix.Preview.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/Baselines/EnumDeclarationTest.RemapTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Compatible.cs new file mode 100644 index 00000000..f4629b97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.RemapTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Compatible.xml new file mode 100644 index 00000000..df2395fc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.RemapTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Default.cs new file mode 100644 index 00000000..f4629b97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Default.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/Baselines/EnumDeclarationTest.RemapTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Default.xml new file mode 100644 index 00000000..df2395fc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Default.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/Baselines/EnumDeclarationTest.RemapTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Latest.cs new file mode 100644 index 00000000..f4629b97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Latest.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/Baselines/EnumDeclarationTest.RemapTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Latest.xml new file mode 100644 index 00000000..df2395fc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Latest.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/Baselines/EnumDeclarationTest.RemapTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Preview.cs new file mode 100644 index 00000000..f4629b97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Preview.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/Baselines/EnumDeclarationTest.RemapTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Preview.xml new file mode 100644 index 00000000..df2395fc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.RemapTest.Windows.Preview.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/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Compatible.cs new file mode 100644 index 00000000..1ba5fe8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Compatible.xml new file mode 100644 index 00000000..26f7ce06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Compatible.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + MyEnum1_Value1 + + + + + + uint + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Default.cs new file mode 100644 index 00000000..1ba5fe8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Default.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/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Default.xml new file mode 100644 index 00000000..26f7ce06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Default.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + MyEnum1_Value1 + + + + + + uint + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Latest.cs new file mode 100644 index 00000000..1ba5fe8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Latest.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/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Latest.xml new file mode 100644 index 00000000..26f7ce06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Latest.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + MyEnum1_Value1 + + + + + + uint + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Preview.cs new file mode 100644 index 00000000..1ba5fe8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Preview.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/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Preview.xml new file mode 100644 index 00000000..26f7ce06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Unix.Preview.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + MyEnum1_Value1 + + + + + + uint + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Compatible.cs new file mode 100644 index 00000000..4e3236cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Compatible.xml new file mode 100644 index 00000000..4a4dc354 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Compatible.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + MyEnum1_Value1 + + + + + + int + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Default.cs new file mode 100644 index 00000000..4e3236cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Default.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/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Default.xml new file mode 100644 index 00000000..4a4dc354 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Default.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + MyEnum1_Value1 + + + + + + int + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Latest.cs new file mode 100644 index 00000000..4e3236cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Latest.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/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Latest.xml new file mode 100644 index 00000000..4a4dc354 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Latest.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + MyEnum1_Value1 + + + + + + int + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Preview.cs new file mode 100644 index 00000000..4e3236cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Preview.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/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Preview.xml new file mode 100644 index 00000000..4a4dc354 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAnonymousEnumTest.Windows.Preview.xml @@ -0,0 +1,22 @@ + + + + + int + + int + + MyEnum1_Value1 + + + + + + int + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Compatible.cs new file mode 100644 index 00000000..99f3c671 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Compatible.xml new file mode 100644 index 00000000..342450a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Compatible.xml @@ -0,0 +1,24 @@ + + + + + Flags + int + + int + + 1 + + + + + int + + int + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Default.cs new file mode 100644 index 00000000..99f3c671 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Default.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/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Default.xml new file mode 100644 index 00000000..342450a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Default.xml @@ -0,0 +1,24 @@ + + + + + Flags + int + + int + + 1 + + + + + int + + int + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Latest.cs new file mode 100644 index 00000000..99f3c671 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Latest.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/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Latest.xml new file mode 100644 index 00000000..342450a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Latest.xml @@ -0,0 +1,24 @@ + + + + + Flags + int + + int + + 1 + + + + + int + + int + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Preview.cs new file mode 100644 index 00000000..99f3c671 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Preview.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/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Preview.xml new file mode 100644 index 00000000..342450a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Unix.Preview.xml @@ -0,0 +1,24 @@ + + + + + Flags + int + + int + + 1 + + + + + int + + int + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Compatible.cs new file mode 100644 index 00000000..99f3c671 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Compatible.xml new file mode 100644 index 00000000..342450a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Compatible.xml @@ -0,0 +1,24 @@ + + + + + Flags + int + + int + + 1 + + + + + int + + int + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Default.cs new file mode 100644 index 00000000..99f3c671 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Default.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/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Default.xml new file mode 100644 index 00000000..342450a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Default.xml @@ -0,0 +1,24 @@ + + + + + Flags + int + + int + + 1 + + + + + int + + int + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Latest.cs new file mode 100644 index 00000000..99f3c671 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Latest.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/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Latest.xml new file mode 100644 index 00000000..342450a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Latest.xml @@ -0,0 +1,24 @@ + + + + + Flags + int + + int + + 1 + + + + + int + + int + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Preview.cs new file mode 100644 index 00000000..99f3c671 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Preview.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/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Preview.xml new file mode 100644 index 00000000..342450a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithAttributeTest.Windows.Preview.xml @@ -0,0 +1,24 @@ + + + + + Flags + int + + int + + 1 + + + + + int + + int + + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Compatible.cs new file mode 100644 index 00000000..9970e625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Compatible.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/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Compatible.xml new file mode 100644 index 00000000..7e684d84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Compatible.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/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Default.cs new file mode 100644 index 00000000..9970e625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Default.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/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Default.xml new file mode 100644 index 00000000..7e684d84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Default.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/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Latest.cs new file mode 100644 index 00000000..9970e625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Latest.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/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Latest.xml new file mode 100644 index 00000000..7e684d84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Latest.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/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Preview.cs new file mode 100644 index 00000000..9970e625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Preview.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/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Preview.xml new file mode 100644 index 00000000..7e684d84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Unix.Preview.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/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Compatible.cs new file mode 100644 index 00000000..9970e625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Compatible.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/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Compatible.xml new file mode 100644 index 00000000..7e684d84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Compatible.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/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Default.cs new file mode 100644 index 00000000..9970e625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Default.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/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Default.xml new file mode 100644 index 00000000..7e684d84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Default.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/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Latest.cs new file mode 100644 index 00000000..9970e625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Latest.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/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Latest.xml new file mode 100644 index 00000000..7e684d84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Latest.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/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Preview.cs new file mode 100644 index 00000000..9970e625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Preview.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/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Preview.xml new file mode 100644 index 00000000..7e684d84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithCastToEnumType.Windows.Preview.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Compatible.cs new file mode 100644 index 00000000..b7334681 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Compatible.xml new file mode 100644 index 00000000..246269d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Default.cs new file mode 100644 index 00000000..b7334681 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Default.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Default.xml new file mode 100644 index 00000000..246269d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Default.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Latest.cs new file mode 100644 index 00000000..b7334681 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Latest.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Latest.xml new file mode 100644 index 00000000..246269d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Latest.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Preview.cs new file mode 100644 index 00000000..b7334681 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Preview.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Preview.xml new file mode 100644 index 00000000..246269d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Unix.Preview.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Compatible.cs new file mode 100644 index 00000000..b7334681 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Compatible.xml new file mode 100644 index 00000000..246269d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Default.cs new file mode 100644 index 00000000..b7334681 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Default.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Default.xml new file mode 100644 index 00000000..246269d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Default.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Latest.cs new file mode 100644 index 00000000..b7334681 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Latest.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Latest.xml new file mode 100644 index 00000000..246269d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Latest.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Preview.cs new file mode 100644 index 00000000..b7334681 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Preview.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/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Preview.xml new file mode 100644 index 00000000..246269d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithMultipleEnumsTest.Windows.Preview.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/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Compatible.cs new file mode 100644 index 00000000..9e34d3ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Compatible.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Compatible.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Default.cs new file mode 100644 index 00000000..9e34d3ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Default.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/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Default.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Default.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Latest.cs new file mode 100644 index 00000000..9e34d3ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Latest.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/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Latest.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Latest.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Preview.cs new file mode 100644 index 00000000..9e34d3ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Preview.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/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Preview.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Unix.Preview.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Compatible.cs new file mode 100644 index 00000000..9e34d3ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Compatible.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Compatible.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Default.cs new file mode 100644 index 00000000..9e34d3ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Default.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/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Default.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Default.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Latest.cs new file mode 100644 index 00000000..9e34d3ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Latest.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/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Latest.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Latest.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Preview.cs new file mode 100644 index 00000000..9e34d3ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Preview.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/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Preview.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarPlusTest.Windows.Preview.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Compatible.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Compatible.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Compatible.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Default.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Default.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/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Default.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Default.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Latest.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Latest.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/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Latest.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Latest.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Preview.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Preview.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/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Preview.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Unix.Preview.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Compatible.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Compatible.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Compatible.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Default.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Default.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/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Default.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Default.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Latest.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Latest.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/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Latest.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Latest.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Preview.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Preview.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/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Preview.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceStarTest.Windows.Preview.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Compatible.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Compatible.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Compatible.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Default.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Default.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/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Default.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Default.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Latest.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Latest.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/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Latest.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Latest.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Preview.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Preview.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/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Preview.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Unix.Preview.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Compatible.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Compatible.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Compatible.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Default.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Default.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/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Default.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Default.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Latest.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Latest.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/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Latest.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Latest.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Preview.cs new file mode 100644 index 00000000..31d97b83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Preview.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/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Preview.xml new file mode 100644 index 00000000..2accd163 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithNamespaceTest.Windows.Preview.xml @@ -0,0 +1,23 @@ + + + + + int + + int + + 1 + + + + + int + + int + + MyEnum1_Value1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Compatible.cs new file mode 100644 index 00000000..2cd4bd84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Compatible.xml new file mode 100644 index 00000000..b8274035 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + uint + + 1 + + + + int + + (int)(MyEnum1_Value1) + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Default.cs new file mode 100644 index 00000000..2cd4bd84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Default.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/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Default.xml new file mode 100644 index 00000000..b8274035 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + uint + + 1 + + + + int + + (int)(MyEnum1_Value1) + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Latest.cs new file mode 100644 index 00000000..2cd4bd84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Latest.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/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Latest.xml new file mode 100644 index 00000000..b8274035 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + uint + + 1 + + + + int + + (int)(MyEnum1_Value1) + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Preview.cs new file mode 100644 index 00000000..2cd4bd84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Preview.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/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Preview.xml new file mode 100644 index 00000000..b8274035 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + uint + + 1 + + + + int + + (int)(MyEnum1_Value1) + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Compatible.cs new file mode 100644 index 00000000..640829ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Compatible.xml new file mode 100644 index 00000000..725ba5ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + int + + 1 + + + + int + + (int)(MyEnum1_Value1) + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Default.cs new file mode 100644 index 00000000..640829ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Default.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/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Default.xml new file mode 100644 index 00000000..725ba5ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + int + + 1 + + + + int + + (int)(MyEnum1_Value1) + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Latest.cs new file mode 100644 index 00000000..640829ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Latest.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/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Latest.xml new file mode 100644 index 00000000..725ba5ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + int + + 1 + + + + int + + (int)(MyEnum1_Value1) + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Preview.cs new file mode 100644 index 00000000..640829ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Preview.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/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Preview.xml new file mode 100644 index 00000000..725ba5ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithReferenceToAnonymousEnumEnumeratorTest.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + int + + 1 + + + + int + + (int)(MyEnum1_Value1) + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Compatible.cs new file mode 100644 index 00000000..de571b8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Compatible.xml new file mode 100644 index 00000000..af859643 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Compatible.xml @@ -0,0 +1,20 @@ + + + + + uint + + uint + + + uint + + + uint + + 0x80000000 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Default.cs new file mode 100644 index 00000000..de571b8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Default.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/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Default.xml new file mode 100644 index 00000000..af859643 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Default.xml @@ -0,0 +1,20 @@ + + + + + uint + + uint + + + uint + + + uint + + 0x80000000 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Latest.cs new file mode 100644 index 00000000..de571b8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Latest.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/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Latest.xml new file mode 100644 index 00000000..af859643 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Latest.xml @@ -0,0 +1,20 @@ + + + + + uint + + uint + + + uint + + + uint + + 0x80000000 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Preview.cs new file mode 100644 index 00000000..de571b8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Preview.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/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Preview.xml new file mode 100644 index 00000000..af859643 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Unix.Preview.xml @@ -0,0 +1,20 @@ + + + + + uint + + uint + + + uint + + + uint + + 0x80000000 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Compatible.cs new file mode 100644 index 00000000..de571b8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Compatible.xml new file mode 100644 index 00000000..af859643 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Compatible.xml @@ -0,0 +1,20 @@ + + + + + uint + + uint + + + uint + + + uint + + 0x80000000 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Default.cs new file mode 100644 index 00000000..de571b8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Default.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/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Default.xml new file mode 100644 index 00000000..af859643 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Default.xml @@ -0,0 +1,20 @@ + + + + + uint + + uint + + + uint + + + uint + + 0x80000000 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Latest.cs new file mode 100644 index 00000000..de571b8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Latest.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/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Latest.xml new file mode 100644 index 00000000..af859643 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Latest.xml @@ -0,0 +1,20 @@ + + + + + uint + + uint + + + uint + + + uint + + 0x80000000 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Preview.cs new file mode 100644 index 00000000..de571b8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Preview.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/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Preview.xml new file mode 100644 index 00000000..af859643 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeAndicitConversionTest.Windows.Preview.xml @@ -0,0 +1,20 @@ + + + + + uint + + uint + + + uint + + + uint + + 0x80000000 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Compatible.cs new file mode 100644 index 00000000..659d112c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Compatible.xml new file mode 100644 index 00000000..002e9e19 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Default.cs new file mode 100644 index 00000000..659d112c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Default.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/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Default.xml new file mode 100644 index 00000000..002e9e19 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Latest.cs new file mode 100644 index 00000000..659d112c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Latest.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/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Latest.xml new file mode 100644 index 00000000..002e9e19 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Preview.cs new file mode 100644 index 00000000..659d112c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Preview.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/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Preview.xml new file mode 100644 index 00000000..002e9e19 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Compatible.cs new file mode 100644 index 00000000..659d112c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Compatible.xml new file mode 100644 index 00000000..002e9e19 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Default.cs new file mode 100644 index 00000000..659d112c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Default.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/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Default.xml new file mode 100644 index 00000000..002e9e19 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Latest.cs new file mode 100644 index 00000000..659d112c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Latest.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/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Latest.xml new file mode 100644 index 00000000..002e9e19 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Preview.cs new file mode 100644 index 00000000..659d112c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Preview.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/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Preview.xml new file mode 100644 index 00000000..002e9e19 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarOverrideTest.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + int + + int + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Compatible.cs new file mode 100644 index 00000000..5bd310a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Compatible.xml new file mode 100644 index 00000000..ef4accb4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Default.cs new file mode 100644 index 00000000..5bd310a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Default.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/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Default.xml new file mode 100644 index 00000000..ef4accb4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Latest.cs new file mode 100644 index 00000000..5bd310a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Latest.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/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Latest.xml new file mode 100644 index 00000000..ef4accb4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Preview.cs new file mode 100644 index 00000000..5bd310a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Preview.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/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Preview.xml new file mode 100644 index 00000000..ef4accb4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Compatible.cs new file mode 100644 index 00000000..5bd310a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Compatible.xml new file mode 100644 index 00000000..ef4accb4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Default.cs new file mode 100644 index 00000000..5bd310a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Default.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/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Default.xml new file mode 100644 index 00000000..ef4accb4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Latest.cs new file mode 100644 index 00000000..5bd310a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Latest.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/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Latest.xml new file mode 100644 index 00000000..ef4accb4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Preview.cs new file mode 100644 index 00000000..5bd310a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Preview.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/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Preview.xml new file mode 100644 index 00000000..ef4accb4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeStarTest.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + + uint + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Compatible.cs new file mode 100644 index 00000000..092a29dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Compatible.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Default.cs new file mode 100644 index 00000000..092a29dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Default.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/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Default.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Latest.cs new file mode 100644 index 00000000..092a29dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Latest.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/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Latest.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Preview.cs new file mode 100644 index 00000000..092a29dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Preview.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/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Preview.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Compatible.cs new file mode 100644 index 00000000..092a29dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Compatible.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Default.cs new file mode 100644 index 00000000..092a29dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Default.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/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Default.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Latest.cs new file mode 100644 index 00000000..092a29dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Latest.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/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Latest.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Preview.cs new file mode 100644 index 00000000..092a29dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Preview.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/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Preview.xml new file mode 100644 index 00000000..005e362f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithTypeTest.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + uint + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Compatible.cs new file mode 100644 index 00000000..403d87a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Compatible.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/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Compatible.xml new file mode 100644 index 00000000..e662876c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Compatible.xml @@ -0,0 +1,27 @@ + + + + + int + + int + + + int + + + int + + + + int + + 0x80000000 + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Default.cs new file mode 100644 index 00000000..403d87a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Default.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/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Default.xml new file mode 100644 index 00000000..e662876c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Default.xml @@ -0,0 +1,27 @@ + + + + + int + + int + + + int + + + int + + + + int + + 0x80000000 + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Latest.cs new file mode 100644 index 00000000..403d87a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Latest.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/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Latest.xml new file mode 100644 index 00000000..e662876c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Latest.xml @@ -0,0 +1,27 @@ + + + + + int + + int + + + int + + + int + + + + int + + 0x80000000 + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Preview.cs new file mode 100644 index 00000000..403d87a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Preview.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/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Preview.xml new file mode 100644 index 00000000..e662876c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Unix.Preview.xml @@ -0,0 +1,27 @@ + + + + + int + + int + + + int + + + int + + + + int + + 0x80000000 + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Compatible.cs new file mode 100644 index 00000000..403d87a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Compatible.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/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Compatible.xml new file mode 100644 index 00000000..e662876c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Compatible.xml @@ -0,0 +1,27 @@ + + + + + int + + int + + + int + + + int + + + + int + + 0x80000000 + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Default.cs new file mode 100644 index 00000000..403d87a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Default.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/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Default.xml new file mode 100644 index 00000000..e662876c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Default.xml @@ -0,0 +1,27 @@ + + + + + int + + int + + + int + + + int + + + + int + + 0x80000000 + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Latest.cs new file mode 100644 index 00000000..403d87a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Latest.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/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Latest.xml new file mode 100644 index 00000000..e662876c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Latest.xml @@ -0,0 +1,27 @@ + + + + + int + + int + + + int + + + int + + + + int + + 0x80000000 + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Preview.cs new file mode 100644 index 00000000..403d87a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Preview.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/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Preview.xml new file mode 100644 index 00000000..e662876c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/EnumDeclarationTest.WithicitConversionTest.Windows.Preview.xml @@ -0,0 +1,27 @@ + + + + + int + + int + + + int + + + int + + + + int + + 0x80000000 + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Compatible.cs new file mode 100644 index 00000000..3cfe222f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.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/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Compatible.xml new file mode 100644 index 00000000..06828316 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.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/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Default.cs new file mode 100644 index 00000000..89cbd7c6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Default.cs @@ -0,0 +1,35 @@ +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; + + public ref int a + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + } + } + + 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/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Default.xml new file mode 100644 index 00000000..9fc2bc3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Default.xml @@ -0,0 +1,29 @@ + + + + + + _Anonymous_e__Struct + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + + + + + int + + + + + + void + MyUnion myUnion = new MyUnion(); + + myUnion.Anonymous.a = 10; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Latest.cs new file mode 100644 index 00000000..d0cd9021 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.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/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Latest.xml new file mode 100644 index 00000000..dabae223 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.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/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Preview.cs new file mode 100644 index 00000000..d0cd9021 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.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/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.Preview.xml new file mode 100644 index 00000000..dabae223 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Unix.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/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Compatible.cs new file mode 100644 index 00000000..3cfe222f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.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/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Compatible.xml new file mode 100644 index 00000000..06828316 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.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/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Default.cs new file mode 100644 index 00000000..89cbd7c6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Default.cs @@ -0,0 +1,35 @@ +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; + + public ref int a + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + } + } + + 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/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Default.xml new file mode 100644 index 00000000..9fc2bc3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Default.xml @@ -0,0 +1,29 @@ + + + + + + _Anonymous_e__Struct + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + + + + + int + + + + + + void + MyUnion myUnion = new MyUnion(); + + myUnion.Anonymous.a = 10; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Latest.cs new file mode 100644 index 00000000..d0cd9021 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.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/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Latest.xml new file mode 100644 index 00000000..dabae223 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.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/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Preview.cs new file mode 100644 index 00000000..d0cd9021 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.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/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.Preview.xml new file mode 100644 index 00000000..dabae223 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.AccessUnionMemberTest.Windows.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/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Compatible.cs new file mode 100644 index 00000000..ad4fe443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Compatible.xml new file mode 100644 index 00000000..90c7ba99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int* + + + int + + return pData[index]; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Default.cs new file mode 100644 index 00000000..ad4fe443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Default.xml new file mode 100644 index 00000000..90c7ba99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int* + + + int + + return pData[index]; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Latest.cs new file mode 100644 index 00000000..ad4fe443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Latest.xml new file mode 100644 index 00000000..90c7ba99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int* + + + int + + return pData[index]; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Preview.cs new file mode 100644 index 00000000..ad4fe443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Preview.xml new file mode 100644 index 00000000..90c7ba99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int* + + + int + + return pData[index]; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Compatible.cs new file mode 100644 index 00000000..ad4fe443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Compatible.xml new file mode 100644 index 00000000..90c7ba99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int* + + + int + + return pData[index]; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Default.cs new file mode 100644 index 00000000..ad4fe443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Default.xml new file mode 100644 index 00000000..90c7ba99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int* + + + int + + return pData[index]; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Latest.cs new file mode 100644 index 00000000..ad4fe443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Latest.xml new file mode 100644 index 00000000..90c7ba99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int* + + + int + + return pData[index]; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Preview.cs new file mode 100644 index 00000000..ad4fe443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Preview.xml new file mode 100644 index 00000000..90c7ba99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ArraySubscriptTest.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int* + + + int + + return pData[index]; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Compatible.cs new file mode 100644 index 00000000..68762ff7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Compatible.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static void MyFunction() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Compatible.xml new file mode 100644 index 00000000..9d7e1575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Default.cs new file mode 100644 index 00000000..68762ff7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Default.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static void MyFunction() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Default.xml new file mode 100644 index 00000000..9d7e1575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Default.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Latest.cs new file mode 100644 index 00000000..68762ff7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Latest.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static void MyFunction() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Latest.xml new file mode 100644 index 00000000..9d7e1575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Latest.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Preview.cs new file mode 100644 index 00000000..68762ff7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Preview.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static void MyFunction() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Preview.xml new file mode 100644 index 00000000..9d7e1575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Unix.Preview.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Compatible.cs new file mode 100644 index 00000000..68762ff7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Compatible.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static void MyFunction() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Compatible.xml new file mode 100644 index 00000000..9d7e1575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Default.cs new file mode 100644 index 00000000..68762ff7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Default.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static void MyFunction() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Default.xml new file mode 100644 index 00000000..9d7e1575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Default.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Latest.cs new file mode 100644 index 00000000..68762ff7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Latest.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static void MyFunction() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Latest.xml new file mode 100644 index 00000000..9d7e1575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Latest.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Preview.cs new file mode 100644 index 00000000..68762ff7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Preview.cs @@ -0,0 +1,9 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static void MyFunction() + { + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Preview.xml new file mode 100644 index 00000000..9d7e1575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BasicTest.Windows.Preview.xml @@ -0,0 +1,11 @@ + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Compatible.cs new file mode 100644 index 00000000..4da2b4bb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Compatible.xml new file mode 100644 index 00000000..044ceb7a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x % y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Default.cs new file mode 100644 index 00000000..4da2b4bb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Default.xml new file mode 100644 index 00000000..044ceb7a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x % y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Latest.cs new file mode 100644 index 00000000..4da2b4bb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Latest.xml new file mode 100644 index 00000000..044ceb7a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x % y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Preview.cs new file mode 100644 index 00000000..4da2b4bb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Preview.xml new file mode 100644 index 00000000..044ceb7a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x % y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Compatible.cs new file mode 100644 index 00000000..4da2b4bb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Compatible.xml new file mode 100644 index 00000000..044ceb7a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x % y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Default.cs new file mode 100644 index 00000000..4da2b4bb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Default.xml new file mode 100644 index 00000000..044ceb7a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x % y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Latest.cs new file mode 100644 index 00000000..4da2b4bb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Latest.xml new file mode 100644 index 00000000..044ceb7a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x % y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Preview.cs new file mode 100644 index 00000000..4da2b4bb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Preview.xml new file mode 100644 index 00000000..044ceb7a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x % y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Compatible.cs new file mode 100644 index 00000000..72e36e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Compatible.xml new file mode 100644 index 00000000..a9b11f35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x %= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Default.cs new file mode 100644 index 00000000..72e36e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Default.xml new file mode 100644 index 00000000..a9b11f35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x %= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Latest.cs new file mode 100644 index 00000000..72e36e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Latest.xml new file mode 100644 index 00000000..a9b11f35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x %= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Preview.cs new file mode 100644 index 00000000..72e36e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Preview.xml new file mode 100644 index 00000000..a9b11f35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x %= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Compatible.cs new file mode 100644 index 00000000..72e36e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Compatible.xml new file mode 100644 index 00000000..a9b11f35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x %= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Default.cs new file mode 100644 index 00000000..72e36e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Default.xml new file mode 100644 index 00000000..a9b11f35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x %= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Latest.cs new file mode 100644 index 00000000..72e36e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Latest.xml new file mode 100644 index 00000000..a9b11f35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x %= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Preview.cs new file mode 100644 index 00000000..72e36e91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Preview.xml new file mode 100644 index 00000000..a9b11f35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.%=.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x %= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Compatible.cs new file mode 100644 index 00000000..47d5830e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Compatible.xml new file mode 100644 index 00000000..8a8285f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x & y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Default.cs new file mode 100644 index 00000000..47d5830e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Default.xml new file mode 100644 index 00000000..8a8285f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x & y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Latest.cs new file mode 100644 index 00000000..47d5830e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Latest.xml new file mode 100644 index 00000000..8a8285f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x & y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Preview.cs new file mode 100644 index 00000000..47d5830e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Preview.xml new file mode 100644 index 00000000..8a8285f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x & y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Compatible.cs new file mode 100644 index 00000000..47d5830e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Compatible.xml new file mode 100644 index 00000000..8a8285f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x & y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Default.cs new file mode 100644 index 00000000..47d5830e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Default.xml new file mode 100644 index 00000000..8a8285f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x & y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Latest.cs new file mode 100644 index 00000000..47d5830e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Latest.xml new file mode 100644 index 00000000..8a8285f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x & y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Preview.cs new file mode 100644 index 00000000..47d5830e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Preview.xml new file mode 100644 index 00000000..8a8285f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x & y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Compatible.cs new file mode 100644 index 00000000..d786db3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Compatible.xml new file mode 100644 index 00000000..6a3d3ef9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x &= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Default.cs new file mode 100644 index 00000000..d786db3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Default.xml new file mode 100644 index 00000000..6a3d3ef9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x &= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Latest.cs new file mode 100644 index 00000000..d786db3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Latest.xml new file mode 100644 index 00000000..6a3d3ef9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x &= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Preview.cs new file mode 100644 index 00000000..d786db3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Preview.xml new file mode 100644 index 00000000..6a3d3ef9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x &= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Compatible.cs new file mode 100644 index 00000000..d786db3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Compatible.xml new file mode 100644 index 00000000..6a3d3ef9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x &= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Default.cs new file mode 100644 index 00000000..d786db3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Default.xml new file mode 100644 index 00000000..6a3d3ef9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x &= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Latest.cs new file mode 100644 index 00000000..d786db3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Latest.xml new file mode 100644 index 00000000..6a3d3ef9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x &= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Preview.cs new file mode 100644 index 00000000..d786db3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Preview.xml new file mode 100644 index 00000000..6a3d3ef9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.&=.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x &= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Compatible.cs new file mode 100644 index 00000000..d2a42be1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Compatible.xml new file mode 100644 index 00000000..2e3943b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x + y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Default.cs new file mode 100644 index 00000000..d2a42be1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Default.xml new file mode 100644 index 00000000..2e3943b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x + y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Latest.cs new file mode 100644 index 00000000..d2a42be1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Latest.xml new file mode 100644 index 00000000..2e3943b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x + y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Preview.cs new file mode 100644 index 00000000..d2a42be1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Preview.xml new file mode 100644 index 00000000..2e3943b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x + y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Compatible.cs new file mode 100644 index 00000000..d2a42be1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Compatible.xml new file mode 100644 index 00000000..2e3943b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x + y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Default.cs new file mode 100644 index 00000000..d2a42be1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Default.xml new file mode 100644 index 00000000..2e3943b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x + y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Latest.cs new file mode 100644 index 00000000..d2a42be1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Latest.xml new file mode 100644 index 00000000..2e3943b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x + y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Preview.cs new file mode 100644 index 00000000..d2a42be1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Preview.xml new file mode 100644 index 00000000..2e3943b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x + y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Compatible.cs new file mode 100644 index 00000000..0fa06060 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Compatible.xml new file mode 100644 index 00000000..e590b55c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x += y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Default.cs new file mode 100644 index 00000000..0fa06060 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Default.xml new file mode 100644 index 00000000..e590b55c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x += y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Latest.cs new file mode 100644 index 00000000..0fa06060 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Latest.xml new file mode 100644 index 00000000..e590b55c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x += y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Preview.cs new file mode 100644 index 00000000..0fa06060 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Preview.xml new file mode 100644 index 00000000..e590b55c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x += y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Compatible.cs new file mode 100644 index 00000000..0fa06060 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Compatible.xml new file mode 100644 index 00000000..e590b55c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x += y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Default.cs new file mode 100644 index 00000000..0fa06060 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Default.xml new file mode 100644 index 00000000..e590b55c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x += y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Latest.cs new file mode 100644 index 00000000..0fa06060 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Latest.xml new file mode 100644 index 00000000..e590b55c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x += y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Preview.cs new file mode 100644 index 00000000..0fa06060 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Preview.xml new file mode 100644 index 00000000..e590b55c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.+=.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x += y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Compatible.cs new file mode 100644 index 00000000..5bcdd615 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Compatible.xml new file mode 100644 index 00000000..0794d0e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x - y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Default.cs new file mode 100644 index 00000000..5bcdd615 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Default.xml new file mode 100644 index 00000000..0794d0e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x - y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Latest.cs new file mode 100644 index 00000000..5bcdd615 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Latest.xml new file mode 100644 index 00000000..0794d0e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x - y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Preview.cs new file mode 100644 index 00000000..5bcdd615 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Preview.xml new file mode 100644 index 00000000..0794d0e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x - y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Compatible.cs new file mode 100644 index 00000000..5bcdd615 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Compatible.xml new file mode 100644 index 00000000..0794d0e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x - y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Default.cs new file mode 100644 index 00000000..5bcdd615 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Default.xml new file mode 100644 index 00000000..0794d0e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x - y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Latest.cs new file mode 100644 index 00000000..5bcdd615 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Latest.xml new file mode 100644 index 00000000..0794d0e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x - y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Preview.cs new file mode 100644 index 00000000..5bcdd615 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Preview.xml new file mode 100644 index 00000000..0794d0e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x - y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Compatible.cs new file mode 100644 index 00000000..8d80a1cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Compatible.xml new file mode 100644 index 00000000..24ee63cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x -= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Default.cs new file mode 100644 index 00000000..8d80a1cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Default.xml new file mode 100644 index 00000000..24ee63cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x -= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Latest.cs new file mode 100644 index 00000000..8d80a1cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Latest.xml new file mode 100644 index 00000000..24ee63cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x -= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Preview.cs new file mode 100644 index 00000000..8d80a1cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Preview.xml new file mode 100644 index 00000000..24ee63cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x -= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Compatible.cs new file mode 100644 index 00000000..8d80a1cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Compatible.xml new file mode 100644 index 00000000..24ee63cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x -= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Default.cs new file mode 100644 index 00000000..8d80a1cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Default.xml new file mode 100644 index 00000000..24ee63cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x -= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Latest.cs new file mode 100644 index 00000000..8d80a1cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Latest.xml new file mode 100644 index 00000000..24ee63cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x -= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Preview.cs new file mode 100644 index 00000000..8d80a1cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Preview.xml new file mode 100644 index 00000000..24ee63cc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.-=.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x -= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Compatible.cs new file mode 100644 index 00000000..c3cd2099 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Compatible.xml new file mode 100644 index 00000000..d6b5fa3a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x = y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Default.cs new file mode 100644 index 00000000..c3cd2099 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Default.xml new file mode 100644 index 00000000..d6b5fa3a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x = y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Latest.cs new file mode 100644 index 00000000..c3cd2099 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Latest.xml new file mode 100644 index 00000000..d6b5fa3a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x = y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Preview.cs new file mode 100644 index 00000000..c3cd2099 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Preview.xml new file mode 100644 index 00000000..d6b5fa3a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x = y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Compatible.cs new file mode 100644 index 00000000..c3cd2099 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Compatible.xml new file mode 100644 index 00000000..d6b5fa3a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x = y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Default.cs new file mode 100644 index 00000000..c3cd2099 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Default.xml new file mode 100644 index 00000000..d6b5fa3a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x = y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Latest.cs new file mode 100644 index 00000000..c3cd2099 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Latest.xml new file mode 100644 index 00000000..d6b5fa3a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x = y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Preview.cs new file mode 100644 index 00000000..c3cd2099 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Preview.xml new file mode 100644 index 00000000..d6b5fa3a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.=.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x = y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Compatible.cs new file mode 100644 index 00000000..c5fe7077 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Compatible.xml new file mode 100644 index 00000000..e8245844 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^ y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Default.cs new file mode 100644 index 00000000..c5fe7077 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Default.xml new file mode 100644 index 00000000..e8245844 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^ y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Latest.cs new file mode 100644 index 00000000..c5fe7077 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Latest.xml new file mode 100644 index 00000000..e8245844 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^ y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Preview.cs new file mode 100644 index 00000000..c5fe7077 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Preview.xml new file mode 100644 index 00000000..e8245844 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^ y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Compatible.cs new file mode 100644 index 00000000..c5fe7077 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Compatible.xml new file mode 100644 index 00000000..e8245844 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^ y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Default.cs new file mode 100644 index 00000000..c5fe7077 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Default.xml new file mode 100644 index 00000000..e8245844 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^ y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Latest.cs new file mode 100644 index 00000000..c5fe7077 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Latest.xml new file mode 100644 index 00000000..e8245844 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^ y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Preview.cs new file mode 100644 index 00000000..c5fe7077 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Preview.xml new file mode 100644 index 00000000..e8245844 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^ y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Compatible.cs new file mode 100644 index 00000000..3195189b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Compatible.xml new file mode 100644 index 00000000..65188504 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Default.cs new file mode 100644 index 00000000..3195189b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Default.xml new file mode 100644 index 00000000..65188504 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Latest.cs new file mode 100644 index 00000000..3195189b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Latest.xml new file mode 100644 index 00000000..65188504 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Preview.cs new file mode 100644 index 00000000..3195189b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Preview.xml new file mode 100644 index 00000000..65188504 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Compatible.cs new file mode 100644 index 00000000..3195189b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Compatible.xml new file mode 100644 index 00000000..65188504 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Default.cs new file mode 100644 index 00000000..3195189b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Default.xml new file mode 100644 index 00000000..65188504 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Latest.cs new file mode 100644 index 00000000..3195189b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Latest.xml new file mode 100644 index 00000000..65188504 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Preview.cs new file mode 100644 index 00000000..3195189b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Preview.xml new file mode 100644 index 00000000..65188504 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.^=.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x ^= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Compatible.cs new file mode 100644 index 00000000..785c82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Compatible.xml new file mode 100644 index 00000000..ae471b1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x * y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Default.cs new file mode 100644 index 00000000..785c82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Default.xml new file mode 100644 index 00000000..ae471b1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x * y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Latest.cs new file mode 100644 index 00000000..785c82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Latest.xml new file mode 100644 index 00000000..ae471b1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x * y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Preview.cs new file mode 100644 index 00000000..785c82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Preview.xml new file mode 100644 index 00000000..ae471b1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x * y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Compatible.cs new file mode 100644 index 00000000..785c82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Compatible.xml new file mode 100644 index 00000000..ae471b1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x * y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Default.cs new file mode 100644 index 00000000..785c82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Default.xml new file mode 100644 index 00000000..ae471b1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x * y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Latest.cs new file mode 100644 index 00000000..785c82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Latest.xml new file mode 100644 index 00000000..ae471b1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x * y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Preview.cs new file mode 100644 index 00000000..785c82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Preview.xml new file mode 100644 index 00000000..ae471b1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x * y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Compatible.cs new file mode 100644 index 00000000..62a03115 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Compatible.xml new file mode 100644 index 00000000..0d2ba5c0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x *= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Default.cs new file mode 100644 index 00000000..62a03115 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Default.xml new file mode 100644 index 00000000..0d2ba5c0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x *= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Latest.cs new file mode 100644 index 00000000..62a03115 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Latest.xml new file mode 100644 index 00000000..0d2ba5c0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x *= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Preview.cs new file mode 100644 index 00000000..62a03115 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Preview.xml new file mode 100644 index 00000000..0d2ba5c0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x *= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Compatible.cs new file mode 100644 index 00000000..62a03115 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Compatible.xml new file mode 100644 index 00000000..0d2ba5c0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x *= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Default.cs new file mode 100644 index 00000000..62a03115 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Default.xml new file mode 100644 index 00000000..0d2ba5c0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x *= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Latest.cs new file mode 100644 index 00000000..62a03115 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Latest.xml new file mode 100644 index 00000000..0d2ba5c0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x *= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Preview.cs new file mode 100644 index 00000000..62a03115 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Preview.xml new file mode 100644 index 00000000..0d2ba5c0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__ast=.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x *= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Compatible.cs new file mode 100644 index 00000000..1375e4bd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Compatible.xml new file mode 100644 index 00000000..a13997be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x / y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Default.cs new file mode 100644 index 00000000..1375e4bd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Default.xml new file mode 100644 index 00000000..a13997be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x / y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Latest.cs new file mode 100644 index 00000000..1375e4bd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Latest.xml new file mode 100644 index 00000000..a13997be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x / y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Preview.cs new file mode 100644 index 00000000..1375e4bd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Preview.xml new file mode 100644 index 00000000..a13997be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x / y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Compatible.cs new file mode 100644 index 00000000..1375e4bd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Compatible.xml new file mode 100644 index 00000000..a13997be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x / y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Default.cs new file mode 100644 index 00000000..1375e4bd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Default.xml new file mode 100644 index 00000000..a13997be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x / y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Latest.cs new file mode 100644 index 00000000..1375e4bd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Latest.xml new file mode 100644 index 00000000..a13997be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x / y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Preview.cs new file mode 100644 index 00000000..1375e4bd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Preview.xml new file mode 100644 index 00000000..a13997be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x / y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Compatible.cs new file mode 100644 index 00000000..34e7b975 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Compatible.xml new file mode 100644 index 00000000..0422c4ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x /= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Default.cs new file mode 100644 index 00000000..34e7b975 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Default.xml new file mode 100644 index 00000000..0422c4ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x /= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Latest.cs new file mode 100644 index 00000000..34e7b975 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Latest.xml new file mode 100644 index 00000000..0422c4ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x /= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Preview.cs new file mode 100644 index 00000000..34e7b975 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Preview.xml new file mode 100644 index 00000000..0422c4ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x /= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Compatible.cs new file mode 100644 index 00000000..34e7b975 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Compatible.xml new file mode 100644 index 00000000..0422c4ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x /= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Default.cs new file mode 100644 index 00000000..34e7b975 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Default.xml new file mode 100644 index 00000000..0422c4ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x /= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Latest.cs new file mode 100644 index 00000000..34e7b975 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Latest.xml new file mode 100644 index 00000000..0422c4ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x /= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Preview.cs new file mode 100644 index 00000000..34e7b975 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Preview.xml new file mode 100644 index 00000000..0422c4ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__fs=.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x /= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Compatible.cs new file mode 100644 index 00000000..7bd9af47 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Compatible.xml new file mode 100644 index 00000000..61ead84c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >> y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Default.cs new file mode 100644 index 00000000..7bd9af47 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Default.xml new file mode 100644 index 00000000..61ead84c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >> y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Latest.cs new file mode 100644 index 00000000..7bd9af47 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Latest.xml new file mode 100644 index 00000000..61ead84c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >> y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Preview.cs new file mode 100644 index 00000000..7bd9af47 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Preview.xml new file mode 100644 index 00000000..61ead84c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >> y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Compatible.cs new file mode 100644 index 00000000..7bd9af47 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Compatible.xml new file mode 100644 index 00000000..61ead84c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >> y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Default.cs new file mode 100644 index 00000000..7bd9af47 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Default.xml new file mode 100644 index 00000000..61ead84c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >> y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Latest.cs new file mode 100644 index 00000000..7bd9af47 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Latest.xml new file mode 100644 index 00000000..61ead84c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >> y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Preview.cs new file mode 100644 index 00000000..7bd9af47 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Preview.xml new file mode 100644 index 00000000..61ead84c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >> y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Compatible.cs new file mode 100644 index 00000000..114dfe94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Compatible.xml new file mode 100644 index 00000000..c8e42a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >>= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Default.cs new file mode 100644 index 00000000..114dfe94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Default.xml new file mode 100644 index 00000000..c8e42a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >>= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Latest.cs new file mode 100644 index 00000000..114dfe94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Latest.xml new file mode 100644 index 00000000..c8e42a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >>= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Preview.cs new file mode 100644 index 00000000..114dfe94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Preview.xml new file mode 100644 index 00000000..c8e42a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >>= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Compatible.cs new file mode 100644 index 00000000..114dfe94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Compatible.xml new file mode 100644 index 00000000..c8e42a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >>= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Default.cs new file mode 100644 index 00000000..114dfe94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Default.xml new file mode 100644 index 00000000..c8e42a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >>= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Latest.cs new file mode 100644 index 00000000..114dfe94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Latest.xml new file mode 100644 index 00000000..c8e42a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >>= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Preview.cs new file mode 100644 index 00000000..114dfe94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Preview.xml new file mode 100644 index 00000000..c8e42a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__gt__gt=.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x >>= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Compatible.cs new file mode 100644 index 00000000..15b8b654 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Compatible.xml new file mode 100644 index 00000000..45707086 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x << y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Default.cs new file mode 100644 index 00000000..15b8b654 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Default.xml new file mode 100644 index 00000000..45707086 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x << y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Latest.cs new file mode 100644 index 00000000..15b8b654 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Latest.xml new file mode 100644 index 00000000..45707086 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x << y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Preview.cs new file mode 100644 index 00000000..15b8b654 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Preview.xml new file mode 100644 index 00000000..45707086 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x << y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Compatible.cs new file mode 100644 index 00000000..15b8b654 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Compatible.xml new file mode 100644 index 00000000..45707086 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x << y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Default.cs new file mode 100644 index 00000000..15b8b654 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Default.xml new file mode 100644 index 00000000..45707086 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x << y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Latest.cs new file mode 100644 index 00000000..15b8b654 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Latest.xml new file mode 100644 index 00000000..45707086 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x << y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Preview.cs new file mode 100644 index 00000000..15b8b654 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Preview.xml new file mode 100644 index 00000000..45707086 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x << y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Compatible.cs new file mode 100644 index 00000000..78a80adf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Compatible.xml new file mode 100644 index 00000000..819a82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x <<= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Default.cs new file mode 100644 index 00000000..78a80adf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Default.xml new file mode 100644 index 00000000..819a82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x <<= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Latest.cs new file mode 100644 index 00000000..78a80adf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Latest.xml new file mode 100644 index 00000000..819a82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x <<= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Preview.cs new file mode 100644 index 00000000..78a80adf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Preview.xml new file mode 100644 index 00000000..819a82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x <<= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Compatible.cs new file mode 100644 index 00000000..78a80adf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Compatible.xml new file mode 100644 index 00000000..819a82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x <<= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Default.cs new file mode 100644 index 00000000..78a80adf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Default.xml new file mode 100644 index 00000000..819a82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x <<= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Latest.cs new file mode 100644 index 00000000..78a80adf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Latest.xml new file mode 100644 index 00000000..819a82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x <<= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Preview.cs new file mode 100644 index 00000000..78a80adf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Preview.xml new file mode 100644 index 00000000..819a82cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__lt__lt=.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x <<= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Compatible.cs new file mode 100644 index 00000000..866b64a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Compatible.xml new file mode 100644 index 00000000..421fa861 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x | y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Default.cs new file mode 100644 index 00000000..866b64a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Default.xml new file mode 100644 index 00000000..421fa861 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x | y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Latest.cs new file mode 100644 index 00000000..866b64a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Latest.xml new file mode 100644 index 00000000..421fa861 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x | y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Preview.cs new file mode 100644 index 00000000..866b64a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Preview.xml new file mode 100644 index 00000000..421fa861 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x | y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Compatible.cs new file mode 100644 index 00000000..866b64a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Compatible.xml new file mode 100644 index 00000000..421fa861 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x | y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Default.cs new file mode 100644 index 00000000..866b64a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Default.xml new file mode 100644 index 00000000..421fa861 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x | y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Latest.cs new file mode 100644 index 00000000..866b64a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Latest.xml new file mode 100644 index 00000000..421fa861 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x | y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Preview.cs new file mode 100644 index 00000000..866b64a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Preview.xml new file mode 100644 index 00000000..421fa861 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x | y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Compatible.cs new file mode 100644 index 00000000..c719c190 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Compatible.xml new file mode 100644 index 00000000..77484443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x |= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Default.cs new file mode 100644 index 00000000..c719c190 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Default.xml new file mode 100644 index 00000000..77484443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x |= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Latest.cs new file mode 100644 index 00000000..c719c190 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Latest.xml new file mode 100644 index 00000000..77484443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x |= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Preview.cs new file mode 100644 index 00000000..c719c190 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Preview.xml new file mode 100644 index 00000000..77484443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x |= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Compatible.cs new file mode 100644 index 00000000..c719c190 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Compatible.xml new file mode 100644 index 00000000..77484443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x |= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Default.cs new file mode 100644 index 00000000..c719c190 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Default.xml new file mode 100644 index 00000000..77484443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x |= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Latest.cs new file mode 100644 index 00000000..c719c190 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Latest.xml new file mode 100644 index 00000000..77484443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x |= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Preview.cs new file mode 100644 index 00000000..c719c190 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Preview.xml new file mode 100644 index 00000000..77484443 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBasicTest.__vl=.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int + + int + + + int + + return x |= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Compatible.cs new file mode 100644 index 00000000..94478e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Compatible.xml new file mode 100644 index 00000000..cee04571 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x && y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Default.cs new file mode 100644 index 00000000..94478e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Default.xml new file mode 100644 index 00000000..cee04571 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x && y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Latest.cs new file mode 100644 index 00000000..94478e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Latest.xml new file mode 100644 index 00000000..cee04571 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x && y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Preview.cs new file mode 100644 index 00000000..94478e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Preview.xml new file mode 100644 index 00000000..cee04571 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x && y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Compatible.cs new file mode 100644 index 00000000..94478e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Compatible.xml new file mode 100644 index 00000000..cee04571 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x && y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Default.cs new file mode 100644 index 00000000..94478e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Default.xml new file mode 100644 index 00000000..cee04571 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x && y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Latest.cs new file mode 100644 index 00000000..94478e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Latest.xml new file mode 100644 index 00000000..cee04571 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x && y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Preview.cs new file mode 100644 index 00000000..94478e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Preview.xml new file mode 100644 index 00000000..cee04571 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.&&.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x && y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Compatible.cs new file mode 100644 index 00000000..800c8d60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Compatible.xml new file mode 100644 index 00000000..6ff94797 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x || y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Default.cs new file mode 100644 index 00000000..800c8d60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Default.xml new file mode 100644 index 00000000..6ff94797 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x || y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Latest.cs new file mode 100644 index 00000000..800c8d60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Latest.xml new file mode 100644 index 00000000..6ff94797 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x || y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Preview.cs new file mode 100644 index 00000000..800c8d60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Preview.xml new file mode 100644 index 00000000..6ff94797 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x || y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Compatible.cs new file mode 100644 index 00000000..800c8d60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Compatible.xml new file mode 100644 index 00000000..6ff94797 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x || y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Default.cs new file mode 100644 index 00000000..800c8d60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Default.xml new file mode 100644 index 00000000..6ff94797 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x || y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Latest.cs new file mode 100644 index 00000000..800c8d60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Latest.xml new file mode 100644 index 00000000..6ff94797 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x || y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Preview.cs new file mode 100644 index 00000000..800c8d60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Preview.xml new file mode 100644 index 00000000..6ff94797 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorBooleanTest.__vl__vl.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + bool + + + bool + + return x || y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Compatible.cs new file mode 100644 index 00000000..297eb581 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Compatible.xml new file mode 100644 index 00000000..81dac47a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x != y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Default.cs new file mode 100644 index 00000000..297eb581 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Default.xml new file mode 100644 index 00000000..81dac47a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x != y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Latest.cs new file mode 100644 index 00000000..297eb581 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Latest.xml new file mode 100644 index 00000000..81dac47a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x != y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Preview.cs new file mode 100644 index 00000000..297eb581 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Preview.xml new file mode 100644 index 00000000..81dac47a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x != y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Compatible.cs new file mode 100644 index 00000000..297eb581 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Compatible.xml new file mode 100644 index 00000000..81dac47a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x != y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Default.cs new file mode 100644 index 00000000..297eb581 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Default.xml new file mode 100644 index 00000000..81dac47a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x != y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Latest.cs new file mode 100644 index 00000000..297eb581 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Latest.xml new file mode 100644 index 00000000..81dac47a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x != y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Preview.cs new file mode 100644 index 00000000..297eb581 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Preview.xml new file mode 100644 index 00000000..81dac47a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.!=.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x != y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Compatible.cs new file mode 100644 index 00000000..0c94c881 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Compatible.xml new file mode 100644 index 00000000..bf0ba6e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x == y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Default.cs new file mode 100644 index 00000000..0c94c881 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Default.xml new file mode 100644 index 00000000..bf0ba6e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x == y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Latest.cs new file mode 100644 index 00000000..0c94c881 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Latest.xml new file mode 100644 index 00000000..bf0ba6e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x == y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Preview.cs new file mode 100644 index 00000000..0c94c881 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Preview.xml new file mode 100644 index 00000000..bf0ba6e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x == y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Compatible.cs new file mode 100644 index 00000000..0c94c881 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Compatible.xml new file mode 100644 index 00000000..bf0ba6e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x == y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Default.cs new file mode 100644 index 00000000..0c94c881 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Default.xml new file mode 100644 index 00000000..bf0ba6e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x == y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Latest.cs new file mode 100644 index 00000000..0c94c881 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Latest.xml new file mode 100644 index 00000000..bf0ba6e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x == y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Preview.cs new file mode 100644 index 00000000..0c94c881 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Preview.xml new file mode 100644 index 00000000..bf0ba6e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.==.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x == y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Compatible.cs new file mode 100644 index 00000000..2ab09b4e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Compatible.xml new file mode 100644 index 00000000..441d9508 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x > y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Default.cs new file mode 100644 index 00000000..2ab09b4e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Default.xml new file mode 100644 index 00000000..441d9508 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x > y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Latest.cs new file mode 100644 index 00000000..2ab09b4e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Latest.xml new file mode 100644 index 00000000..441d9508 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x > y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Preview.cs new file mode 100644 index 00000000..2ab09b4e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Preview.xml new file mode 100644 index 00000000..441d9508 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x > y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Compatible.cs new file mode 100644 index 00000000..2ab09b4e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Compatible.xml new file mode 100644 index 00000000..441d9508 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x > y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Default.cs new file mode 100644 index 00000000..2ab09b4e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Default.xml new file mode 100644 index 00000000..441d9508 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x > y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Latest.cs new file mode 100644 index 00000000..2ab09b4e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Latest.xml new file mode 100644 index 00000000..441d9508 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x > y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Preview.cs new file mode 100644 index 00000000..2ab09b4e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Preview.xml new file mode 100644 index 00000000..441d9508 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x > y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Compatible.cs new file mode 100644 index 00000000..7dcf453f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Compatible.xml new file mode 100644 index 00000000..de135332 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x >= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Default.cs new file mode 100644 index 00000000..7dcf453f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Default.xml new file mode 100644 index 00000000..de135332 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x >= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Latest.cs new file mode 100644 index 00000000..7dcf453f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Latest.xml new file mode 100644 index 00000000..de135332 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x >= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Preview.cs new file mode 100644 index 00000000..7dcf453f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Preview.xml new file mode 100644 index 00000000..de135332 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x >= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Compatible.cs new file mode 100644 index 00000000..7dcf453f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Compatible.xml new file mode 100644 index 00000000..de135332 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x >= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Default.cs new file mode 100644 index 00000000..7dcf453f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Default.xml new file mode 100644 index 00000000..de135332 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x >= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Latest.cs new file mode 100644 index 00000000..7dcf453f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Latest.xml new file mode 100644 index 00000000..de135332 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x >= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Preview.cs new file mode 100644 index 00000000..7dcf453f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Preview.xml new file mode 100644 index 00000000..de135332 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__gt=.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x >= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Compatible.cs new file mode 100644 index 00000000..8a62045c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Compatible.xml new file mode 100644 index 00000000..f69caa39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x < y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Default.cs new file mode 100644 index 00000000..8a62045c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Default.xml new file mode 100644 index 00000000..f69caa39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x < y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Latest.cs new file mode 100644 index 00000000..8a62045c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Latest.xml new file mode 100644 index 00000000..f69caa39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x < y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Preview.cs new file mode 100644 index 00000000..8a62045c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Preview.xml new file mode 100644 index 00000000..f69caa39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x < y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Compatible.cs new file mode 100644 index 00000000..8a62045c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Compatible.xml new file mode 100644 index 00000000..f69caa39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x < y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Default.cs new file mode 100644 index 00000000..8a62045c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Default.xml new file mode 100644 index 00000000..f69caa39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x < y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Latest.cs new file mode 100644 index 00000000..8a62045c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Latest.xml new file mode 100644 index 00000000..f69caa39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x < y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Preview.cs new file mode 100644 index 00000000..8a62045c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Preview.xml new file mode 100644 index 00000000..f69caa39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x < y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Compatible.cs new file mode 100644 index 00000000..a2e5eab8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Compatible.xml new file mode 100644 index 00000000..7ae8c808 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x <= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Default.cs new file mode 100644 index 00000000..a2e5eab8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Default.xml new file mode 100644 index 00000000..7ae8c808 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x <= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Latest.cs new file mode 100644 index 00000000..a2e5eab8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Latest.xml new file mode 100644 index 00000000..7ae8c808 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x <= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Preview.cs new file mode 100644 index 00000000..a2e5eab8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Preview.xml new file mode 100644 index 00000000..7ae8c808 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x <= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Compatible.cs new file mode 100644 index 00000000..a2e5eab8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Compatible.xml new file mode 100644 index 00000000..7ae8c808 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x <= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Default.cs new file mode 100644 index 00000000..a2e5eab8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Default.xml new file mode 100644 index 00000000..7ae8c808 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x <= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Latest.cs new file mode 100644 index 00000000..a2e5eab8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Latest.xml new file mode 100644 index 00000000..7ae8c808 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x <= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Preview.cs new file mode 100644 index 00000000..a2e5eab8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Preview.xml new file mode 100644 index 00000000..7ae8c808 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BinaryOperatorCompareTest.__lt=.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + bool + + int + + + int + + return x <= y; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Compatible.cs new file mode 100644 index 00000000..210a914f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Compatible.xml new file mode 100644 index 00000000..b074d282 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + break; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Default.cs new file mode 100644 index 00000000..210a914f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Default.xml new file mode 100644 index 00000000..b074d282 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + break; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Latest.cs new file mode 100644 index 00000000..210a914f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Latest.xml new file mode 100644 index 00000000..b074d282 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + break; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Preview.cs new file mode 100644 index 00000000..210a914f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Preview.xml new file mode 100644 index 00000000..b074d282 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + break; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Compatible.cs new file mode 100644 index 00000000..210a914f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Compatible.xml new file mode 100644 index 00000000..b074d282 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + break; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Default.cs new file mode 100644 index 00000000..210a914f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Default.xml new file mode 100644 index 00000000..b074d282 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + break; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Latest.cs new file mode 100644 index 00000000..210a914f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Latest.xml new file mode 100644 index 00000000..b074d282 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + break; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Preview.cs new file mode 100644 index 00000000..210a914f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Preview.xml new file mode 100644 index 00000000..b074d282 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.BreakTest.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + break; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Compatible.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Compatible.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Default.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Default.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Latest.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Latest.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Preview.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Preview.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Compatible.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Compatible.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Default.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Default.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Latest.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Latest.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Preview.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Preview.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CStyleFunctionalCastTest.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Compatible.cs new file mode 100644 index 00000000..edfc6a34 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Compatible.xml new file mode 100644 index 00000000..6f914d24 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Compatible.xml @@ -0,0 +1,15 @@ + + + + + + void + + + + void + MyCalledFunction(); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Default.cs new file mode 100644 index 00000000..edfc6a34 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Default.xml new file mode 100644 index 00000000..6f914d24 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Default.xml @@ -0,0 +1,15 @@ + + + + + + void + + + + void + MyCalledFunction(); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Latest.cs new file mode 100644 index 00000000..edfc6a34 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Latest.xml new file mode 100644 index 00000000..6f914d24 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Latest.xml @@ -0,0 +1,15 @@ + + + + + + void + + + + void + MyCalledFunction(); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Preview.cs new file mode 100644 index 00000000..edfc6a34 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Preview.xml new file mode 100644 index 00000000..6f914d24 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Unix.Preview.xml @@ -0,0 +1,15 @@ + + + + + + void + + + + void + MyCalledFunction(); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Compatible.cs new file mode 100644 index 00000000..edfc6a34 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Compatible.xml new file mode 100644 index 00000000..6f914d24 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Compatible.xml @@ -0,0 +1,15 @@ + + + + + + void + + + + void + MyCalledFunction(); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Default.cs new file mode 100644 index 00000000..edfc6a34 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Default.xml new file mode 100644 index 00000000..6f914d24 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Default.xml @@ -0,0 +1,15 @@ + + + + + + void + + + + void + MyCalledFunction(); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Latest.cs new file mode 100644 index 00000000..edfc6a34 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Latest.xml new file mode 100644 index 00000000..6f914d24 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Latest.xml @@ -0,0 +1,15 @@ + + + + + + void + + + + void + MyCalledFunction(); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Preview.cs new file mode 100644 index 00000000..edfc6a34 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Preview.xml new file mode 100644 index 00000000..6f914d24 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionTest.Windows.Preview.xml @@ -0,0 +1,15 @@ + + + + + + void + + + + void + MyCalledFunction(); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Compatible.cs new file mode 100644 index 00000000..915731c1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Compatible.xml new file mode 100644 index 00000000..9f1ccbf0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + void + + int + + + int + + + + + void + MyCalledFunction(0, 1); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Default.cs new file mode 100644 index 00000000..915731c1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Default.xml new file mode 100644 index 00000000..9f1ccbf0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Default.xml @@ -0,0 +1,21 @@ + + + + + + void + + int + + + int + + + + + void + MyCalledFunction(0, 1); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Latest.cs new file mode 100644 index 00000000..915731c1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Latest.xml new file mode 100644 index 00000000..9f1ccbf0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + void + + int + + + int + + + + + void + MyCalledFunction(0, 1); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Preview.cs new file mode 100644 index 00000000..915731c1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Preview.xml new file mode 100644 index 00000000..9f1ccbf0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + void + + int + + + int + + + + + void + MyCalledFunction(0, 1); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Compatible.cs new file mode 100644 index 00000000..915731c1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Compatible.xml new file mode 100644 index 00000000..9f1ccbf0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + void + + int + + + int + + + + + void + MyCalledFunction(0, 1); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Default.cs new file mode 100644 index 00000000..915731c1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Default.xml new file mode 100644 index 00000000..9f1ccbf0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Default.xml @@ -0,0 +1,21 @@ + + + + + + void + + int + + + int + + + + + void + MyCalledFunction(0, 1); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Latest.cs new file mode 100644 index 00000000..915731c1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Latest.xml new file mode 100644 index 00000000..9f1ccbf0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + void + + int + + + int + + + + + void + MyCalledFunction(0, 1); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Preview.cs new file mode 100644 index 00000000..915731c1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Preview.xml new file mode 100644 index 00000000..9f1ccbf0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CallFunctionWithArgsTest.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + void + + int + + + int + + + + + void + MyCalledFunction(0, 1); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Compatible.cs new file mode 100644 index 00000000..5455198a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Compatible.xml new file mode 100644 index 00000000..ec4d7978 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Default.cs new file mode 100644 index 00000000..5455198a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Default.xml new file mode 100644 index 00000000..ec4d7978 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Latest.cs new file mode 100644 index 00000000..5455198a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Latest.xml new file mode 100644 index 00000000..ec4d7978 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Preview.cs new file mode 100644 index 00000000..5455198a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Preview.xml new file mode 100644 index 00000000..ec4d7978 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Compatible.cs new file mode 100644 index 00000000..5455198a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Compatible.xml new file mode 100644 index 00000000..ec4d7978 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Default.cs new file mode 100644 index 00000000..5455198a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Default.xml new file mode 100644 index 00000000..ec4d7978 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Latest.cs new file mode 100644 index 00000000..5455198a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Latest.xml new file mode 100644 index 00000000..ec4d7978 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Preview.cs new file mode 100644 index 00000000..5455198a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Preview.xml new file mode 100644 index 00000000..ec4d7978 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseNoCompoundTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Compatible.cs new file mode 100644 index 00000000..8bfda41b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Compatible.xml new file mode 100644 index 00000000..213f7724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Default.cs new file mode 100644 index 00000000..8bfda41b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Default.xml new file mode 100644 index 00000000..213f7724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Latest.cs new file mode 100644 index 00000000..8bfda41b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Latest.xml new file mode 100644 index 00000000..213f7724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Preview.cs new file mode 100644 index 00000000..8bfda41b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Preview.xml new file mode 100644 index 00000000..213f7724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Compatible.cs new file mode 100644 index 00000000..8bfda41b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Compatible.xml new file mode 100644 index 00000000..213f7724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Default.cs new file mode 100644 index 00000000..8bfda41b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Default.xml new file mode 100644 index 00000000..213f7724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Latest.cs new file mode 100644 index 00000000..8bfda41b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Latest.xml new file mode 100644 index 00000000..213f7724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Preview.cs new file mode 100644 index 00000000..8bfda41b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Preview.xml new file mode 100644 index 00000000..213f7724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CaseTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Compatible.cs new file mode 100644 index 00000000..373b635a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Compatible.xml new file mode 100644 index 00000000..500b3b31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Default.cs new file mode 100644 index 00000000..373b635a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Default.xml new file mode 100644 index 00000000..500b3b31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Latest.cs new file mode 100644 index 00000000..373b635a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Latest.xml new file mode 100644 index 00000000..500b3b31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Preview.cs new file mode 100644 index 00000000..373b635a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Preview.xml new file mode 100644 index 00000000..500b3b31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Compatible.cs new file mode 100644 index 00000000..373b635a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Compatible.xml new file mode 100644 index 00000000..500b3b31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Default.cs new file mode 100644 index 00000000..373b635a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Default.xml new file mode 100644 index 00000000..500b3b31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Latest.cs new file mode 100644 index 00000000..373b635a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Latest.xml new file mode 100644 index 00000000..500b3b31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Preview.cs new file mode 100644 index 00000000..373b635a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Preview.xml new file mode 100644 index 00000000..500b3b31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CompareMultipleEnumTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Compatible.cs new file mode 100644 index 00000000..c6d43d85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Compatible.xml new file mode 100644 index 00000000..97ea7e10 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Compatible.xml @@ -0,0 +1,20 @@ + + + + + + int + + bool + + + int + + + int + + return condition ? lhs : rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Default.cs new file mode 100644 index 00000000..c6d43d85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Default.xml new file mode 100644 index 00000000..97ea7e10 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Default.xml @@ -0,0 +1,20 @@ + + + + + + int + + bool + + + int + + + int + + return condition ? lhs : rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Latest.cs new file mode 100644 index 00000000..c6d43d85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Latest.xml new file mode 100644 index 00000000..97ea7e10 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Latest.xml @@ -0,0 +1,20 @@ + + + + + + int + + bool + + + int + + + int + + return condition ? lhs : rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Preview.cs new file mode 100644 index 00000000..c6d43d85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Preview.xml new file mode 100644 index 00000000..97ea7e10 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Unix.Preview.xml @@ -0,0 +1,20 @@ + + + + + + int + + bool + + + int + + + int + + return condition ? lhs : rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Compatible.cs new file mode 100644 index 00000000..c6d43d85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Compatible.xml new file mode 100644 index 00000000..97ea7e10 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Compatible.xml @@ -0,0 +1,20 @@ + + + + + + int + + bool + + + int + + + int + + return condition ? lhs : rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Default.cs new file mode 100644 index 00000000..c6d43d85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Default.xml new file mode 100644 index 00000000..97ea7e10 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Default.xml @@ -0,0 +1,20 @@ + + + + + + int + + bool + + + int + + + int + + return condition ? lhs : rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Latest.cs new file mode 100644 index 00000000..c6d43d85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Latest.xml new file mode 100644 index 00000000..97ea7e10 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Latest.xml @@ -0,0 +1,20 @@ + + + + + + int + + bool + + + int + + + int + + return condition ? lhs : rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Preview.cs new file mode 100644 index 00000000..c6d43d85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Preview.xml new file mode 100644 index 00000000..97ea7e10 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ConditionalOperatorTest.Windows.Preview.xml @@ -0,0 +1,20 @@ + + + + + + int + + bool + + + int + + + int + + return condition ? lhs : rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Compatible.cs new file mode 100644 index 00000000..c01ed821 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Compatible.xml new file mode 100644 index 00000000..ef206625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + continue; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Default.cs new file mode 100644 index 00000000..c01ed821 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Default.xml new file mode 100644 index 00000000..ef206625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + continue; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Latest.cs new file mode 100644 index 00000000..c01ed821 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Latest.xml new file mode 100644 index 00000000..ef206625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + continue; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Preview.cs new file mode 100644 index 00000000..c01ed821 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Preview.xml new file mode 100644 index 00000000..ef206625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + continue; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Compatible.cs new file mode 100644 index 00000000..c01ed821 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Compatible.xml new file mode 100644 index 00000000..ef206625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + continue; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Default.cs new file mode 100644 index 00000000..c01ed821 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Default.xml new file mode 100644 index 00000000..ef206625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + continue; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Latest.cs new file mode 100644 index 00000000..c01ed821 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Latest.xml new file mode 100644 index 00000000..ef206625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + continue; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Preview.cs new file mode 100644 index 00000000..c01ed821 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Preview.xml new file mode 100644 index 00000000..ef206625 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ContinueTest.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + int + + int + + while (true) + { + continue; + } + + return 0; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Compatible.cs new file mode 100644 index 00000000..8cfe9f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Compatible.xml new file mode 100644 index 00000000..e28dfd48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + void* + + void* + + return input; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Default.cs new file mode 100644 index 00000000..8cfe9f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Default.xml new file mode 100644 index 00000000..e28dfd48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + void* + + void* + + return input; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Latest.cs new file mode 100644 index 00000000..8cfe9f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Latest.xml new file mode 100644 index 00000000..e28dfd48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + void* + + void* + + return input; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Preview.cs new file mode 100644 index 00000000..8cfe9f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Preview.xml new file mode 100644 index 00000000..e28dfd48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + void* + + void* + + return input; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Compatible.cs new file mode 100644 index 00000000..8cfe9f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Compatible.xml new file mode 100644 index 00000000..e28dfd48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + void* + + void* + + return input; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Default.cs new file mode 100644 index 00000000..8cfe9f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Default.xml new file mode 100644 index 00000000..e28dfd48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + void* + + void* + + return input; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Latest.cs new file mode 100644 index 00000000..8cfe9f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Latest.xml new file mode 100644 index 00000000..e28dfd48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + void* + + void* + + return input; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Preview.cs new file mode 100644 index 00000000..8cfe9f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Preview.xml new file mode 100644 index 00000000..e28dfd48 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxConstCastTest.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + void* + + void* + + return input; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Compatible.cs new file mode 100644 index 00000000..9b949b10 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.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/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Compatible.xml new file mode 100644 index 00000000..71ec32f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.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/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Default.cs new file mode 100644 index 00000000..822b63f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.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/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Default.xml new file mode 100644 index 00000000..f9669ca6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.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/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Latest.cs new file mode 100644 index 00000000..822b63f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.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/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Latest.xml new file mode 100644 index 00000000..f9669ca6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.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/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Preview.cs new file mode 100644 index 00000000..822b63f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.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/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.Preview.xml new file mode 100644 index 00000000..f9669ca6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Unix.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/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Compatible.cs new file mode 100644 index 00000000..9b949b10 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.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/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Compatible.xml new file mode 100644 index 00000000..71ec32f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.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/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Default.cs new file mode 100644 index 00000000..822b63f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.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/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Default.xml new file mode 100644 index 00000000..f9669ca6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.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/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Latest.cs new file mode 100644 index 00000000..822b63f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.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/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Latest.xml new file mode 100644 index 00000000..f9669ca6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.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/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Preview.cs new file mode 100644 index 00000000..822b63f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.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/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.Preview.xml new file mode 100644 index 00000000..f9669ca6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxDynamicCastTest.Windows.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/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Compatible.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Compatible.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Default.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Default.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Latest.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Latest.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Preview.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Preview.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Compatible.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Compatible.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Default.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Default.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Latest.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Latest.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Preview.cs new file mode 100644 index 00000000..10bb563b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Preview.xml new file mode 100644 index 00000000..ea58cedb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxFunctionalCastTest.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + float + + return (int)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Compatible.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Compatible.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Default.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Default.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Latest.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Latest.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Preview.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Preview.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Compatible.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Compatible.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Default.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Default.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Latest.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Latest.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Preview.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Preview.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxReinterpretCastTest.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Compatible.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Compatible.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Default.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Default.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Latest.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Latest.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Preview.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Preview.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Compatible.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Compatible.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Default.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Default.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Latest.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Latest.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Preview.cs new file mode 100644 index 00000000..4c8db4a3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Preview.xml new file mode 100644 index 00000000..a126989a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.CxxStaticCastTest.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int* + + void* + + return (int*)(input); + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Compatible.cs new file mode 100644 index 00000000..06b3fbb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Compatible.xml new file mode 100644 index 00000000..350b7d46 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Default.cs new file mode 100644 index 00000000..06b3fbb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Default.xml new file mode 100644 index 00000000..350b7d46 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Latest.cs new file mode 100644 index 00000000..06b3fbb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Latest.xml new file mode 100644 index 00000000..350b7d46 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Preview.cs new file mode 100644 index 00000000..06b3fbb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Preview.xml new file mode 100644 index 00000000..350b7d46 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Compatible.cs new file mode 100644 index 00000000..06b3fbb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Compatible.xml new file mode 100644 index 00000000..350b7d46 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Default.cs new file mode 100644 index 00000000..06b3fbb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Default.xml new file mode 100644 index 00000000..350b7d46 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Latest.cs new file mode 100644 index 00000000..06b3fbb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Latest.xml new file mode 100644 index 00000000..350b7d46 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Preview.cs new file mode 100644 index 00000000..06b3fbb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Preview.xml new file mode 100644 index 00000000..350b7d46 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DeclTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Compatible.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Compatible.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Default.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Default.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Default.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Latest.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Latest.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Preview.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Preview.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Compatible.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Compatible.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Default.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Default.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Default.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Latest.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Latest.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Preview.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Preview.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoNonCompoundTest.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Compatible.cs new file mode 100644 index 00000000..f7a3d222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Compatible.xml new file mode 100644 index 00000000..2bca7ca2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Compatible.xml @@ -0,0 +1,22 @@ + + + + + + int + + int + + int i = 0; + + do + { + i++; + } + while (i < count); + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Default.cs new file mode 100644 index 00000000..f7a3d222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Default.xml new file mode 100644 index 00000000..2bca7ca2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Default.xml @@ -0,0 +1,22 @@ + + + + + + int + + int + + int i = 0; + + do + { + i++; + } + while (i < count); + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Latest.cs new file mode 100644 index 00000000..f7a3d222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Latest.xml new file mode 100644 index 00000000..2bca7ca2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Latest.xml @@ -0,0 +1,22 @@ + + + + + + int + + int + + int i = 0; + + do + { + i++; + } + while (i < count); + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Preview.cs new file mode 100644 index 00000000..f7a3d222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Preview.xml new file mode 100644 index 00000000..2bca7ca2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Unix.Preview.xml @@ -0,0 +1,22 @@ + + + + + + int + + int + + int i = 0; + + do + { + i++; + } + while (i < count); + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Compatible.cs new file mode 100644 index 00000000..f7a3d222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Compatible.xml new file mode 100644 index 00000000..2bca7ca2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Compatible.xml @@ -0,0 +1,22 @@ + + + + + + int + + int + + int i = 0; + + do + { + i++; + } + while (i < count); + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Default.cs new file mode 100644 index 00000000..f7a3d222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Default.xml new file mode 100644 index 00000000..2bca7ca2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Default.xml @@ -0,0 +1,22 @@ + + + + + + int + + int + + int i = 0; + + do + { + i++; + } + while (i < count); + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Latest.cs new file mode 100644 index 00000000..f7a3d222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Latest.xml new file mode 100644 index 00000000..2bca7ca2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Latest.xml @@ -0,0 +1,22 @@ + + + + + + int + + int + + int i = 0; + + do + { + i++; + } + while (i < count); + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Preview.cs new file mode 100644 index 00000000..f7a3d222 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Preview.xml new file mode 100644 index 00000000..2bca7ca2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.DoTest.Windows.Preview.xml @@ -0,0 +1,22 @@ + + + + + + int + + int + + int i = 0; + + do + { + i++; + } + while (i < count); + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Compatible.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Compatible.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Default.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Default.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Latest.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Latest.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Preview.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Preview.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Compatible.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Compatible.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Default.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Default.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Latest.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Latest.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Preview.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Preview.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForNonCompoundTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Compatible.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Compatible.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Default.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Default.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Latest.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Latest.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Preview.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Preview.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Compatible.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Compatible.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Default.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Default.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Latest.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Latest.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Preview.cs new file mode 100644 index 00000000..a2658360 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Preview.xml new file mode 100644 index 00000000..7bdb3bdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ForTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Compatible.cs new file mode 100644 index 00000000..32158b93 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Compatible.xml new file mode 100644 index 00000000..851bfb4f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Default.cs new file mode 100644 index 00000000..32158b93 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Default.xml new file mode 100644 index 00000000..851bfb4f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Latest.cs new file mode 100644 index 00000000..32158b93 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Latest.xml new file mode 100644 index 00000000..851bfb4f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Preview.cs new file mode 100644 index 00000000..32158b93 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Preview.xml new file mode 100644 index 00000000..851bfb4f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Compatible.cs new file mode 100644 index 00000000..32158b93 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Compatible.xml new file mode 100644 index 00000000..851bfb4f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Default.cs new file mode 100644 index 00000000..32158b93 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Default.xml new file mode 100644 index 00000000..851bfb4f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Latest.cs new file mode 100644 index 00000000..32158b93 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Latest.xml new file mode 100644 index 00000000..851bfb4f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Preview.cs new file mode 100644 index 00000000..32158b93 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Preview.xml new file mode 100644 index 00000000..851bfb4f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseIfTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Compatible.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Compatible.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Compatible.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Default.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Default.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Default.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Latest.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Latest.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Latest.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Preview.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Preview.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Unix.Preview.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Compatible.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Compatible.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Compatible.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Default.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Default.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Default.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Latest.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Latest.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Latest.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Preview.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Preview.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseNonCompoundTest.Windows.Preview.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Compatible.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Compatible.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Compatible.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Default.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Default.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Default.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Latest.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Latest.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Latest.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Preview.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Preview.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Unix.Preview.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Compatible.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Compatible.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Compatible.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Default.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Default.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Default.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Latest.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Latest.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Latest.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Preview.cs new file mode 100644 index 00000000..9dd758ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Preview.xml new file mode 100644 index 00000000..a0e537ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfElseTest.Windows.Preview.xml @@ -0,0 +1,27 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + else + { + return rhs; + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Compatible.cs new file mode 100644 index 00000000..0dd6b07f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Compatible.xml new file mode 100644 index 00000000..64972354 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Compatible.xml @@ -0,0 +1,25 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + + return rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Default.cs new file mode 100644 index 00000000..0dd6b07f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Default.xml new file mode 100644 index 00000000..64972354 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Default.xml @@ -0,0 +1,25 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + + return rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Latest.cs new file mode 100644 index 00000000..0dd6b07f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Latest.xml new file mode 100644 index 00000000..64972354 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Latest.xml @@ -0,0 +1,25 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + + return rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Preview.cs new file mode 100644 index 00000000..0dd6b07f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Preview.xml new file mode 100644 index 00000000..64972354 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Unix.Preview.xml @@ -0,0 +1,25 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + + return rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Compatible.cs new file mode 100644 index 00000000..0dd6b07f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Compatible.xml new file mode 100644 index 00000000..64972354 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Compatible.xml @@ -0,0 +1,25 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + + return rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Default.cs new file mode 100644 index 00000000..0dd6b07f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Default.xml new file mode 100644 index 00000000..64972354 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Default.xml @@ -0,0 +1,25 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + + return rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Latest.cs new file mode 100644 index 00000000..0dd6b07f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Latest.xml new file mode 100644 index 00000000..64972354 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Latest.xml @@ -0,0 +1,25 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + + return rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Preview.cs new file mode 100644 index 00000000..0dd6b07f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Preview.xml new file mode 100644 index 00000000..64972354 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.IfTest.Windows.Preview.xml @@ -0,0 +1,25 @@ + + + + + + int + + bool + + + int + + + int + + if (condition) + { + return lhs; + } + + return rhs; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Compatible.cs new file mode 100644 index 00000000..d192847d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Compatible.xml new file mode 100644 index 00000000..441a7326 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Default.cs new file mode 100644 index 00000000..d192847d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Default.xml new file mode 100644 index 00000000..441a7326 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Latest.cs new file mode 100644 index 00000000..d192847d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Latest.xml new file mode 100644 index 00000000..441a7326 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Preview.cs new file mode 100644 index 00000000..d192847d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Preview.xml new file mode 100644 index 00000000..441a7326 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Compatible.cs new file mode 100644 index 00000000..d192847d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Compatible.xml new file mode 100644 index 00000000..441a7326 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Default.cs new file mode 100644 index 00000000..d192847d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Default.xml new file mode 100644 index 00000000..441a7326 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Latest.cs new file mode 100644 index 00000000..d192847d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Latest.xml new file mode 100644 index 00000000..441a7326 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Preview.cs new file mode 100644 index 00000000..d192847d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Preview.xml new file mode 100644 index 00000000..441a7326 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForArrayTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Compatible.cs new file mode 100644 index 00000000..dbbad4f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Compatible.xml new file mode 100644 index 00000000..9d0602d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Default.cs new file mode 100644 index 00000000..dbbad4f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Default.xml new file mode 100644 index 00000000..9d0602d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Latest.cs new file mode 100644 index 00000000..dbbad4f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Latest.xml new file mode 100644 index 00000000..9d0602d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Preview.cs new file mode 100644 index 00000000..dbbad4f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Preview.xml new file mode 100644 index 00000000..9d0602d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Compatible.cs new file mode 100644 index 00000000..dbbad4f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Compatible.xml new file mode 100644 index 00000000..9d0602d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Default.cs new file mode 100644 index 00000000..dbbad4f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Default.xml new file mode 100644 index 00000000..9d0602d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Latest.cs new file mode 100644 index 00000000..dbbad4f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Latest.xml new file mode 100644 index 00000000..9d0602d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Preview.cs new file mode 100644 index 00000000..dbbad4f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Preview.xml new file mode 100644 index 00000000..9d0602d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.InitListForRecordDeclTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Compatible.cs new file mode 100644 index 00000000..5648f3f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Compatible.xml new file mode 100644 index 00000000..a8432fcd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Compatible.xml @@ -0,0 +1,26 @@ + + + + + + int + + + + + int + + MyStruct + + return instance.value; + + + int + + MyStruct* + + return instance->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Default.cs new file mode 100644 index 00000000..5648f3f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Default.xml new file mode 100644 index 00000000..a8432fcd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Default.xml @@ -0,0 +1,26 @@ + + + + + + int + + + + + int + + MyStruct + + return instance.value; + + + int + + MyStruct* + + return instance->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Latest.cs new file mode 100644 index 00000000..5648f3f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Latest.xml new file mode 100644 index 00000000..a8432fcd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Latest.xml @@ -0,0 +1,26 @@ + + + + + + int + + + + + int + + MyStruct + + return instance.value; + + + int + + MyStruct* + + return instance->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Preview.cs new file mode 100644 index 00000000..5648f3f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Preview.xml new file mode 100644 index 00000000..a8432fcd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Unix.Preview.xml @@ -0,0 +1,26 @@ + + + + + + int + + + + + int + + MyStruct + + return instance.value; + + + int + + MyStruct* + + return instance->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Compatible.cs new file mode 100644 index 00000000..5648f3f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Compatible.xml new file mode 100644 index 00000000..a8432fcd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Compatible.xml @@ -0,0 +1,26 @@ + + + + + + int + + + + + int + + MyStruct + + return instance.value; + + + int + + MyStruct* + + return instance->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Default.cs new file mode 100644 index 00000000..5648f3f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Default.xml new file mode 100644 index 00000000..a8432fcd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Default.xml @@ -0,0 +1,26 @@ + + + + + + int + + + + + int + + MyStruct + + return instance.value; + + + int + + MyStruct* + + return instance->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Latest.cs new file mode 100644 index 00000000..5648f3f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Latest.xml new file mode 100644 index 00000000..a8432fcd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Latest.xml @@ -0,0 +1,26 @@ + + + + + + int + + + + + int + + MyStruct + + return instance.value; + + + int + + MyStruct* + + return instance->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Preview.cs new file mode 100644 index 00000000..5648f3f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Preview.xml new file mode 100644 index 00000000..a8432fcd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.MemberTest.Windows.Preview.xml @@ -0,0 +1,26 @@ + + + + + + int + + + + + int + + MyStruct + + return instance.value; + + + int + + MyStruct* + + return instance->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Compatible.cs new file mode 100644 index 00000000..ed5080a4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Compatible.xml new file mode 100644 index 00000000..a9d3331c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Compatible.xml @@ -0,0 +1,22 @@ + + + + + + int + + + + + bool + + MyStruct* + + + MyStruct* + + return lhs->value == rhs->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Default.cs new file mode 100644 index 00000000..ed5080a4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Default.xml new file mode 100644 index 00000000..a9d3331c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Default.xml @@ -0,0 +1,22 @@ + + + + + + int + + + + + bool + + MyStruct* + + + MyStruct* + + return lhs->value == rhs->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Latest.cs new file mode 100644 index 00000000..ed5080a4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Latest.xml new file mode 100644 index 00000000..a9d3331c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Latest.xml @@ -0,0 +1,22 @@ + + + + + + int + + + + + bool + + MyStruct* + + + MyStruct* + + return lhs->value == rhs->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Preview.cs new file mode 100644 index 00000000..ed5080a4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Preview.xml new file mode 100644 index 00000000..a9d3331c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Unix.Preview.xml @@ -0,0 +1,22 @@ + + + + + + int + + + + + bool + + MyStruct* + + + MyStruct* + + return lhs->value == rhs->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Compatible.cs new file mode 100644 index 00000000..ed5080a4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Compatible.xml new file mode 100644 index 00000000..a9d3331c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Compatible.xml @@ -0,0 +1,22 @@ + + + + + + int + + + + + bool + + MyStruct* + + + MyStruct* + + return lhs->value == rhs->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Default.cs new file mode 100644 index 00000000..ed5080a4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Default.xml new file mode 100644 index 00000000..a9d3331c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Default.xml @@ -0,0 +1,22 @@ + + + + + + int + + + + + bool + + MyStruct* + + + MyStruct* + + return lhs->value == rhs->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Latest.cs new file mode 100644 index 00000000..ed5080a4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Latest.xml new file mode 100644 index 00000000..a9d3331c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Latest.xml @@ -0,0 +1,22 @@ + + + + + + int + + + + + bool + + MyStruct* + + + MyStruct* + + return lhs->value == rhs->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Preview.cs new file mode 100644 index 00000000..ed5080a4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Preview.xml new file mode 100644 index 00000000..a9d3331c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.RefToPtrTest.Windows.Preview.xml @@ -0,0 +1,22 @@ + + + + + + int + + + + + bool + + MyStruct* + + + MyStruct* + + return lhs->value == rhs->value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Compatible.cs new file mode 100644 index 00000000..2f79bb94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Compatible.xml new file mode 100644 index 00000000..d4f9a4aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + bool + return false; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Default.cs new file mode 100644 index 00000000..2f79bb94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Default.xml new file mode 100644 index 00000000..d4f9a4aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Default.xml @@ -0,0 +1,11 @@ + + + + + + bool + return false; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Latest.cs new file mode 100644 index 00000000..2f79bb94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Latest.xml new file mode 100644 index 00000000..d4f9a4aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Latest.xml @@ -0,0 +1,11 @@ + + + + + + bool + return false; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Preview.cs new file mode 100644 index 00000000..2f79bb94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Preview.xml new file mode 100644 index 00000000..d4f9a4aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Unix.Preview.xml @@ -0,0 +1,11 @@ + + + + + + bool + return false; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Compatible.cs new file mode 100644 index 00000000..2f79bb94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Compatible.xml new file mode 100644 index 00000000..d4f9a4aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + bool + return false; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Default.cs new file mode 100644 index 00000000..2f79bb94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Default.xml new file mode 100644 index 00000000..d4f9a4aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Default.xml @@ -0,0 +1,11 @@ + + + + + + bool + return false; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Latest.cs new file mode 100644 index 00000000..2f79bb94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Latest.xml new file mode 100644 index 00000000..d4f9a4aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Latest.xml @@ -0,0 +1,11 @@ + + + + + + bool + return false; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Preview.cs new file mode 100644 index 00000000..2f79bb94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Preview.xml new file mode 100644 index 00000000..d4f9a4aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.false.Windows.Preview.xml @@ -0,0 +1,11 @@ + + + + + + bool + return false; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Compatible.cs new file mode 100644 index 00000000..13af7f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Compatible.xml new file mode 100644 index 00000000..4cb527fd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + bool + return true; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Default.cs new file mode 100644 index 00000000..13af7f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Default.xml new file mode 100644 index 00000000..4cb527fd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Default.xml @@ -0,0 +1,11 @@ + + + + + + bool + return true; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Latest.cs new file mode 100644 index 00000000..13af7f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Latest.xml new file mode 100644 index 00000000..4cb527fd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Latest.xml @@ -0,0 +1,11 @@ + + + + + + bool + return true; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Preview.cs new file mode 100644 index 00000000..13af7f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Preview.xml new file mode 100644 index 00000000..4cb527fd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Unix.Preview.xml @@ -0,0 +1,11 @@ + + + + + + bool + return true; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Compatible.cs new file mode 100644 index 00000000..13af7f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Compatible.xml new file mode 100644 index 00000000..4cb527fd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + bool + return true; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Default.cs new file mode 100644 index 00000000..13af7f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Default.xml new file mode 100644 index 00000000..4cb527fd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Default.xml @@ -0,0 +1,11 @@ + + + + + + bool + return true; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Latest.cs new file mode 100644 index 00000000..13af7f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Latest.xml new file mode 100644 index 00000000..4cb527fd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Latest.xml @@ -0,0 +1,11 @@ + + + + + + bool + return true; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Preview.cs new file mode 100644 index 00000000..13af7f5f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Preview.xml new file mode 100644 index 00000000..4cb527fd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXBooleanLiteralTest.true.Windows.Preview.xml @@ -0,0 +1,11 @@ + + + + + + bool + return true; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Compatible.cs new file mode 100644 index 00000000..d45eaa35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Compatible.xml new file mode 100644 index 00000000..68b582fb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Default.cs new file mode 100644 index 00000000..d45eaa35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Default.xml new file mode 100644 index 00000000..68b582fb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Default.xml @@ -0,0 +1,11 @@ + + + + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Latest.cs new file mode 100644 index 00000000..d45eaa35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Latest.xml new file mode 100644 index 00000000..68b582fb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Latest.xml @@ -0,0 +1,11 @@ + + + + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Preview.cs new file mode 100644 index 00000000..d45eaa35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Preview.xml new file mode 100644 index 00000000..68b582fb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Unix.Preview.xml @@ -0,0 +1,11 @@ + + + + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Compatible.cs new file mode 100644 index 00000000..d45eaa35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Compatible.xml new file mode 100644 index 00000000..68b582fb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Default.cs new file mode 100644 index 00000000..d45eaa35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Default.xml new file mode 100644 index 00000000..68b582fb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Default.xml @@ -0,0 +1,11 @@ + + + + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Latest.cs new file mode 100644 index 00000000..d45eaa35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Latest.xml new file mode 100644 index 00000000..68b582fb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Latest.xml @@ -0,0 +1,11 @@ + + + + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Preview.cs new file mode 100644 index 00000000..d45eaa35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Preview.xml new file mode 100644 index 00000000..68b582fb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnCXXNullPtrTest.Windows.Preview.xml @@ -0,0 +1,11 @@ + + + + + + void* + return null; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Compatible.cs new file mode 100644 index 00000000..d9932ae3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Compatible.xml new file mode 100644 index 00000000..3336bc32 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + void + return; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Default.cs new file mode 100644 index 00000000..d9932ae3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Default.xml new file mode 100644 index 00000000..3336bc32 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Default.xml @@ -0,0 +1,11 @@ + + + + + + void + return; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Latest.cs new file mode 100644 index 00000000..d9932ae3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Latest.xml new file mode 100644 index 00000000..3336bc32 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Latest.xml @@ -0,0 +1,11 @@ + + + + + + void + return; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Preview.cs new file mode 100644 index 00000000..d9932ae3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Preview.xml new file mode 100644 index 00000000..3336bc32 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Unix.Preview.xml @@ -0,0 +1,11 @@ + + + + + + void + return; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Compatible.cs new file mode 100644 index 00000000..d9932ae3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Compatible.xml new file mode 100644 index 00000000..3336bc32 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + void + return; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Default.cs new file mode 100644 index 00000000..d9932ae3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Default.xml new file mode 100644 index 00000000..3336bc32 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Default.xml @@ -0,0 +1,11 @@ + + + + + + void + return; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Latest.cs new file mode 100644 index 00000000..d9932ae3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Latest.xml new file mode 100644 index 00000000..3336bc32 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Latest.xml @@ -0,0 +1,11 @@ + + + + + + void + return; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Preview.cs new file mode 100644 index 00000000..d9932ae3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Preview.xml new file mode 100644 index 00000000..3336bc32 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnEmptyTest.Windows.Preview.xml @@ -0,0 +1,11 @@ + + + + + + void + return; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Compatible.cs new file mode 100644 index 00000000..d4df0dce --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Compatible.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 3.14f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Compatible.xml new file mode 100644 index 00000000..5d91fb08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + double + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Default.cs new file mode 100644 index 00000000..d4df0dce --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Default.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 3.14f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Default.xml new file mode 100644 index 00000000..5d91fb08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Default.xml @@ -0,0 +1,11 @@ + + + + + + double + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Latest.cs new file mode 100644 index 00000000..d4df0dce --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Latest.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 3.14f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Latest.xml new file mode 100644 index 00000000..5d91fb08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Latest.xml @@ -0,0 +1,11 @@ + + + + + + double + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Preview.cs new file mode 100644 index 00000000..d4df0dce --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Preview.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 3.14f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Preview.xml new file mode 100644 index 00000000..5d91fb08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Unix.Preview.xml @@ -0,0 +1,11 @@ + + + + + + double + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Compatible.cs new file mode 100644 index 00000000..d4df0dce --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Compatible.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 3.14f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Compatible.xml new file mode 100644 index 00000000..5d91fb08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + double + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Default.cs new file mode 100644 index 00000000..d4df0dce --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Default.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 3.14f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Default.xml new file mode 100644 index 00000000..5d91fb08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Default.xml @@ -0,0 +1,11 @@ + + + + + + double + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Latest.cs new file mode 100644 index 00000000..d4df0dce --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Latest.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 3.14f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Latest.xml new file mode 100644 index 00000000..5d91fb08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Latest.xml @@ -0,0 +1,11 @@ + + + + + + double + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Preview.cs new file mode 100644 index 00000000..d4df0dce --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Preview.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 3.14f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Preview.xml new file mode 100644 index 00000000..5d91fb08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.3.14f.Windows.Preview.xml @@ -0,0 +1,11 @@ + + + + + + double + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Compatible.cs new file mode 100644 index 00000000..108a0b26 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Compatible.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 5e-1f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Compatible.xml new file mode 100644 index 00000000..8622133a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + double + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Default.cs new file mode 100644 index 00000000..108a0b26 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Default.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 5e-1f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Default.xml new file mode 100644 index 00000000..8622133a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Default.xml @@ -0,0 +1,11 @@ + + + + + + double + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Latest.cs new file mode 100644 index 00000000..108a0b26 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Latest.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 5e-1f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Latest.xml new file mode 100644 index 00000000..8622133a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Latest.xml @@ -0,0 +1,11 @@ + + + + + + double + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Preview.cs new file mode 100644 index 00000000..108a0b26 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Preview.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 5e-1f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Preview.xml new file mode 100644 index 00000000..8622133a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Unix.Preview.xml @@ -0,0 +1,11 @@ + + + + + + double + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Compatible.cs new file mode 100644 index 00000000..108a0b26 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Compatible.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 5e-1f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Compatible.xml new file mode 100644 index 00000000..8622133a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + double + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Default.cs new file mode 100644 index 00000000..108a0b26 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Default.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 5e-1f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Default.xml new file mode 100644 index 00000000..8622133a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Default.xml @@ -0,0 +1,11 @@ + + + + + + double + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Latest.cs new file mode 100644 index 00000000..108a0b26 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Latest.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 5e-1f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Latest.xml new file mode 100644 index 00000000..8622133a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Latest.xml @@ -0,0 +1,11 @@ + + + + + + double + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Preview.cs new file mode 100644 index 00000000..108a0b26 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Preview.cs @@ -0,0 +1,10 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyFunction() + { + return 5e-1f; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Preview.xml new file mode 100644 index 00000000..8622133a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralDoubleTest.5e-1f.Windows.Preview.xml @@ -0,0 +1,11 @@ + + + + + + double + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Compatible.cs new file mode 100644 index 00000000..db455ead --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Compatible.xml new file mode 100644 index 00000000..8cf7ce22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + float + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Default.cs new file mode 100644 index 00000000..db455ead --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Default.xml new file mode 100644 index 00000000..8cf7ce22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Default.xml @@ -0,0 +1,11 @@ + + + + + + float + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Latest.cs new file mode 100644 index 00000000..db455ead --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Latest.xml new file mode 100644 index 00000000..8cf7ce22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Latest.xml @@ -0,0 +1,11 @@ + + + + + + float + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Preview.cs new file mode 100644 index 00000000..db455ead --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Preview.xml new file mode 100644 index 00000000..8cf7ce22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Unix.Preview.xml @@ -0,0 +1,11 @@ + + + + + + float + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Compatible.cs new file mode 100644 index 00000000..db455ead --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Compatible.xml new file mode 100644 index 00000000..8cf7ce22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + float + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Default.cs new file mode 100644 index 00000000..db455ead --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Default.xml new file mode 100644 index 00000000..8cf7ce22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Default.xml @@ -0,0 +1,11 @@ + + + + + + float + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Latest.cs new file mode 100644 index 00000000..db455ead --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Latest.xml new file mode 100644 index 00000000..8cf7ce22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Latest.xml @@ -0,0 +1,11 @@ + + + + + + float + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Preview.cs new file mode 100644 index 00000000..db455ead --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Preview.xml new file mode 100644 index 00000000..8cf7ce22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.3.14f.Windows.Preview.xml @@ -0,0 +1,11 @@ + + + + + + float + return 3.14f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Compatible.cs new file mode 100644 index 00000000..1b98eab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Compatible.xml new file mode 100644 index 00000000..faeff00a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + float + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Default.cs new file mode 100644 index 00000000..1b98eab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Default.xml new file mode 100644 index 00000000..faeff00a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Default.xml @@ -0,0 +1,11 @@ + + + + + + float + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Latest.cs new file mode 100644 index 00000000..1b98eab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Latest.xml new file mode 100644 index 00000000..faeff00a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Latest.xml @@ -0,0 +1,11 @@ + + + + + + float + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Preview.cs new file mode 100644 index 00000000..1b98eab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Preview.xml new file mode 100644 index 00000000..faeff00a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Unix.Preview.xml @@ -0,0 +1,11 @@ + + + + + + float + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Compatible.cs new file mode 100644 index 00000000..1b98eab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Compatible.xml new file mode 100644 index 00000000..faeff00a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + float + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Default.cs new file mode 100644 index 00000000..1b98eab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Default.xml new file mode 100644 index 00000000..faeff00a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Default.xml @@ -0,0 +1,11 @@ + + + + + + float + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Latest.cs new file mode 100644 index 00000000..1b98eab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Latest.xml new file mode 100644 index 00000000..faeff00a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Latest.xml @@ -0,0 +1,11 @@ + + + + + + float + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Preview.cs new file mode 100644 index 00000000..1b98eab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Preview.xml new file mode 100644 index 00000000..faeff00a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnFloatingLiteralSingleTest.5e-1f.Windows.Preview.xml @@ -0,0 +1,11 @@ + + + + + + float + return 5e-1f; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Compatible.cs new file mode 100644 index 00000000..dc571a06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Compatible.xml new file mode 100644 index 00000000..76ceb89c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + int + return -1; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Default.cs new file mode 100644 index 00000000..dc571a06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Default.xml new file mode 100644 index 00000000..76ceb89c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Default.xml @@ -0,0 +1,11 @@ + + + + + + int + return -1; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Latest.cs new file mode 100644 index 00000000..dc571a06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Latest.xml new file mode 100644 index 00000000..76ceb89c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Latest.xml @@ -0,0 +1,11 @@ + + + + + + int + return -1; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Preview.cs new file mode 100644 index 00000000..dc571a06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Preview.xml new file mode 100644 index 00000000..76ceb89c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Unix.Preview.xml @@ -0,0 +1,11 @@ + + + + + + int + return -1; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Compatible.cs new file mode 100644 index 00000000..dc571a06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Compatible.xml new file mode 100644 index 00000000..76ceb89c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Compatible.xml @@ -0,0 +1,11 @@ + + + + + + int + return -1; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Default.cs new file mode 100644 index 00000000..dc571a06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Default.xml new file mode 100644 index 00000000..76ceb89c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Default.xml @@ -0,0 +1,11 @@ + + + + + + int + return -1; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Latest.cs new file mode 100644 index 00000000..dc571a06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Latest.xml new file mode 100644 index 00000000..76ceb89c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Latest.xml @@ -0,0 +1,11 @@ + + + + + + int + return -1; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Preview.cs new file mode 100644 index 00000000..dc571a06 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Preview.xml new file mode 100644 index 00000000..76ceb89c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnIntegerLiteralInt32Test.Windows.Preview.xml @@ -0,0 +1,11 @@ + + + + + + int + return -1; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Compatible.cs new file mode 100644 index 00000000..bb51113c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Compatible.xml new file mode 100644 index 00000000..e2c85b7e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Compatible.xml @@ -0,0 +1,24 @@ + + + + + + double + + + double + + + double + + + + + MyStruct + MyStruct myStruct = new MyStruct(); + + return myStruct; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Default.cs new file mode 100644 index 00000000..bb51113c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Default.xml new file mode 100644 index 00000000..e2c85b7e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Default.xml @@ -0,0 +1,24 @@ + + + + + + double + + + double + + + double + + + + + MyStruct + MyStruct myStruct = new MyStruct(); + + return myStruct; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Latest.cs new file mode 100644 index 00000000..bb51113c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Latest.xml new file mode 100644 index 00000000..e2c85b7e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Latest.xml @@ -0,0 +1,24 @@ + + + + + + double + + + double + + + double + + + + + MyStruct + MyStruct myStruct = new MyStruct(); + + return myStruct; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Preview.cs new file mode 100644 index 00000000..bb51113c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Preview.xml new file mode 100644 index 00000000..e2c85b7e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Unix.Preview.xml @@ -0,0 +1,24 @@ + + + + + + double + + + double + + + double + + + + + MyStruct + MyStruct myStruct = new MyStruct(); + + return myStruct; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Compatible.cs new file mode 100644 index 00000000..bb51113c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Compatible.xml new file mode 100644 index 00000000..e2c85b7e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Compatible.xml @@ -0,0 +1,24 @@ + + + + + + double + + + double + + + double + + + + + MyStruct + MyStruct myStruct = new MyStruct(); + + return myStruct; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Default.cs new file mode 100644 index 00000000..bb51113c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Default.xml new file mode 100644 index 00000000..e2c85b7e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Default.xml @@ -0,0 +1,24 @@ + + + + + + double + + + double + + + double + + + + + MyStruct + MyStruct myStruct = new MyStruct(); + + return myStruct; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Latest.cs new file mode 100644 index 00000000..bb51113c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Latest.xml new file mode 100644 index 00000000..e2c85b7e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Latest.xml @@ -0,0 +1,24 @@ + + + + + + double + + + double + + + double + + + + + MyStruct + MyStruct myStruct = new MyStruct(); + + return myStruct; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Preview.cs new file mode 100644 index 00000000..bb51113c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Preview.xml new file mode 100644 index 00000000..e2c85b7e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.ReturnStructTest.Windows.Preview.xml @@ -0,0 +1,24 @@ + + + + + + double + + + double + + + double + + + + + MyStruct + MyStruct myStruct = new MyStruct(); + + return myStruct; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Compatible.cs new file mode 100644 index 00000000..213265e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Compatible.xml new file mode 100644 index 00000000..076dae80 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Compatible.xml @@ -0,0 +1,28 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Default.cs new file mode 100644 index 00000000..213265e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Default.xml new file mode 100644 index 00000000..076dae80 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Default.xml @@ -0,0 +1,28 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Latest.cs new file mode 100644 index 00000000..213265e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Latest.xml new file mode 100644 index 00000000..076dae80 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Latest.xml @@ -0,0 +1,28 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Preview.cs new file mode 100644 index 00000000..213265e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Preview.xml new file mode 100644 index 00000000..076dae80 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Unix.Preview.xml @@ -0,0 +1,28 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Compatible.cs new file mode 100644 index 00000000..213265e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Compatible.xml new file mode 100644 index 00000000..076dae80 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Compatible.xml @@ -0,0 +1,28 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Default.cs new file mode 100644 index 00000000..213265e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Default.xml new file mode 100644 index 00000000..076dae80 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Default.xml @@ -0,0 +1,28 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Latest.cs new file mode 100644 index 00000000..213265e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Latest.xml new file mode 100644 index 00000000..076dae80 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Latest.xml @@ -0,0 +1,28 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Preview.cs new file mode 100644 index 00000000..213265e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Preview.xml new file mode 100644 index 00000000..076dae80 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchNonCompoundTest.Windows.Preview.xml @@ -0,0 +1,28 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Compatible.cs new file mode 100644 index 00000000..e5def936 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Compatible.xml new file mode 100644 index 00000000..0acdee5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Compatible.xml @@ -0,0 +1,20 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Default.cs new file mode 100644 index 00000000..e5def936 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Default.xml new file mode 100644 index 00000000..0acdee5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Default.xml @@ -0,0 +1,20 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Latest.cs new file mode 100644 index 00000000..e5def936 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Latest.xml new file mode 100644 index 00000000..0acdee5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Latest.xml @@ -0,0 +1,20 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Preview.cs new file mode 100644 index 00000000..e5def936 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Preview.xml new file mode 100644 index 00000000..0acdee5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Unix.Preview.xml @@ -0,0 +1,20 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Compatible.cs new file mode 100644 index 00000000..e5def936 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Compatible.xml new file mode 100644 index 00000000..0acdee5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Compatible.xml @@ -0,0 +1,20 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Default.cs new file mode 100644 index 00000000..e5def936 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Default.xml new file mode 100644 index 00000000..0acdee5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Default.xml @@ -0,0 +1,20 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Latest.cs new file mode 100644 index 00000000..e5def936 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Latest.xml new file mode 100644 index 00000000..0acdee5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Latest.xml @@ -0,0 +1,20 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Preview.cs new file mode 100644 index 00000000..e5def936 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Preview.xml new file mode 100644 index 00000000..0acdee5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.SwitchTest.Windows.Preview.xml @@ -0,0 +1,20 @@ + + + + + + int + + int + + switch (value) + { + default: + { + return 0; + } + } + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Compatible.cs new file mode 100644 index 00000000..95cc1940 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Compatible.xml new file mode 100644 index 00000000..0f4fadaa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int* + + int + + return &value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Default.cs new file mode 100644 index 00000000..95cc1940 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Default.xml new file mode 100644 index 00000000..0f4fadaa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int* + + int + + return &value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Latest.cs new file mode 100644 index 00000000..95cc1940 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Latest.xml new file mode 100644 index 00000000..0f4fadaa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int* + + int + + return &value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Preview.cs new file mode 100644 index 00000000..95cc1940 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Preview.xml new file mode 100644 index 00000000..0f4fadaa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int* + + int + + return &value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Compatible.cs new file mode 100644 index 00000000..95cc1940 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Compatible.xml new file mode 100644 index 00000000..0f4fadaa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int* + + int + + return &value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Default.cs new file mode 100644 index 00000000..95cc1940 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Default.xml new file mode 100644 index 00000000..0f4fadaa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int* + + int + + return &value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Latest.cs new file mode 100644 index 00000000..95cc1940 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Latest.xml new file mode 100644 index 00000000..0f4fadaa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int* + + int + + return &value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Preview.cs new file mode 100644 index 00000000..95cc1940 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Preview.xml new file mode 100644 index 00000000..0f4fadaa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorAddrOfTest.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int* + + int + + return &value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Compatible.cs new file mode 100644 index 00000000..db32f4eb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Compatible.xml new file mode 100644 index 00000000..c4af7b6f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int* + + return *value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Default.cs new file mode 100644 index 00000000..db32f4eb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Default.xml new file mode 100644 index 00000000..c4af7b6f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int* + + return *value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Latest.cs new file mode 100644 index 00000000..db32f4eb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Latest.xml new file mode 100644 index 00000000..c4af7b6f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int* + + return *value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Preview.cs new file mode 100644 index 00000000..db32f4eb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Preview.xml new file mode 100644 index 00000000..c4af7b6f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int* + + return *value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Compatible.cs new file mode 100644 index 00000000..db32f4eb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Compatible.xml new file mode 100644 index 00000000..c4af7b6f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int* + + return *value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Default.cs new file mode 100644 index 00000000..db32f4eb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Default.xml new file mode 100644 index 00000000..c4af7b6f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int* + + return *value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Latest.cs new file mode 100644 index 00000000..db32f4eb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Latest.xml new file mode 100644 index 00000000..c4af7b6f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int* + + return *value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Preview.cs new file mode 100644 index 00000000..db32f4eb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Preview.xml new file mode 100644 index 00000000..c4af7b6f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorDerefTest.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int* + + return *value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Compatible.cs new file mode 100644 index 00000000..30ce0438 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Compatible.xml new file mode 100644 index 00000000..aa1d0d9e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + bool + + bool + + return !value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Default.cs new file mode 100644 index 00000000..30ce0438 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Default.xml new file mode 100644 index 00000000..aa1d0d9e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + bool + + bool + + return !value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Latest.cs new file mode 100644 index 00000000..30ce0438 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Latest.xml new file mode 100644 index 00000000..aa1d0d9e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + bool + + bool + + return !value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Preview.cs new file mode 100644 index 00000000..30ce0438 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Preview.xml new file mode 100644 index 00000000..aa1d0d9e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + bool + + bool + + return !value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Compatible.cs new file mode 100644 index 00000000..30ce0438 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Compatible.xml new file mode 100644 index 00000000..aa1d0d9e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + bool + + bool + + return !value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Default.cs new file mode 100644 index 00000000..30ce0438 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Default.xml new file mode 100644 index 00000000..aa1d0d9e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + bool + + bool + + return !value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Latest.cs new file mode 100644 index 00000000..30ce0438 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Latest.xml new file mode 100644 index 00000000..aa1d0d9e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + bool + + bool + + return !value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Preview.cs new file mode 100644 index 00000000..30ce0438 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Preview.xml new file mode 100644 index 00000000..aa1d0d9e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorLogicalNotTest.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + bool + + bool + + return !value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Compatible.cs new file mode 100644 index 00000000..4464bc18 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Compatible.xml new file mode 100644 index 00000000..30c8561e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value++; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Default.cs new file mode 100644 index 00000000..4464bc18 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Default.xml new file mode 100644 index 00000000..30c8561e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value++; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Latest.cs new file mode 100644 index 00000000..4464bc18 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Latest.xml new file mode 100644 index 00000000..30c8561e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value++; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Preview.cs new file mode 100644 index 00000000..4464bc18 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Preview.xml new file mode 100644 index 00000000..30c8561e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value++; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Compatible.cs new file mode 100644 index 00000000..4464bc18 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Compatible.xml new file mode 100644 index 00000000..30c8561e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value++; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Default.cs new file mode 100644 index 00000000..4464bc18 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Default.xml new file mode 100644 index 00000000..30c8561e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value++; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Latest.cs new file mode 100644 index 00000000..4464bc18 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Latest.xml new file mode 100644 index 00000000..30c8561e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value++; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Preview.cs new file mode 100644 index 00000000..4464bc18 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Preview.xml new file mode 100644 index 00000000..30c8561e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.++.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value++; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Compatible.cs new file mode 100644 index 00000000..513691d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Compatible.xml new file mode 100644 index 00000000..2b060edb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value--; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Default.cs new file mode 100644 index 00000000..513691d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Default.xml new file mode 100644 index 00000000..2b060edb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value--; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Latest.cs new file mode 100644 index 00000000..513691d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Latest.xml new file mode 100644 index 00000000..2b060edb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value--; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Preview.cs new file mode 100644 index 00000000..513691d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Preview.xml new file mode 100644 index 00000000..2b060edb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value--; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Compatible.cs new file mode 100644 index 00000000..513691d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Compatible.xml new file mode 100644 index 00000000..2b060edb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value--; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Default.cs new file mode 100644 index 00000000..513691d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Default.xml new file mode 100644 index 00000000..2b060edb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value--; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Latest.cs new file mode 100644 index 00000000..513691d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Latest.xml new file mode 100644 index 00000000..2b060edb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value--; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Preview.cs new file mode 100644 index 00000000..513691d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Preview.xml new file mode 100644 index 00000000..2b060edb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPostfixTest.--.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return value--; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Compatible.cs new file mode 100644 index 00000000..5401aa5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Compatible.xml new file mode 100644 index 00000000..829c87e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ++value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Default.cs new file mode 100644 index 00000000..5401aa5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Default.xml new file mode 100644 index 00000000..829c87e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ++value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Latest.cs new file mode 100644 index 00000000..5401aa5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Latest.xml new file mode 100644 index 00000000..829c87e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ++value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Preview.cs new file mode 100644 index 00000000..5401aa5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Preview.xml new file mode 100644 index 00000000..829c87e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ++value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Compatible.cs new file mode 100644 index 00000000..5401aa5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Compatible.xml new file mode 100644 index 00000000..829c87e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ++value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Default.cs new file mode 100644 index 00000000..5401aa5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Default.xml new file mode 100644 index 00000000..829c87e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ++value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Latest.cs new file mode 100644 index 00000000..5401aa5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Latest.xml new file mode 100644 index 00000000..829c87e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ++value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Preview.cs new file mode 100644 index 00000000..5401aa5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Preview.xml new file mode 100644 index 00000000..829c87e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.++.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ++value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Compatible.cs new file mode 100644 index 00000000..ed8beab6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Compatible.xml new file mode 100644 index 00000000..e5f539ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return +value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Default.cs new file mode 100644 index 00000000..ed8beab6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Default.xml new file mode 100644 index 00000000..e5f539ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return +value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Latest.cs new file mode 100644 index 00000000..ed8beab6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Latest.xml new file mode 100644 index 00000000..e5f539ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return +value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Preview.cs new file mode 100644 index 00000000..ed8beab6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Preview.xml new file mode 100644 index 00000000..e5f539ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return +value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Compatible.cs new file mode 100644 index 00000000..ed8beab6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Compatible.xml new file mode 100644 index 00000000..e5f539ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return +value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Default.cs new file mode 100644 index 00000000..ed8beab6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Default.xml new file mode 100644 index 00000000..e5f539ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return +value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Latest.cs new file mode 100644 index 00000000..ed8beab6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Latest.xml new file mode 100644 index 00000000..e5f539ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return +value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Preview.cs new file mode 100644 index 00000000..ed8beab6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Preview.xml new file mode 100644 index 00000000..e5f539ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.+.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return +value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Compatible.cs new file mode 100644 index 00000000..ce701c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Compatible.xml new file mode 100644 index 00000000..4d04e391 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return --value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Default.cs new file mode 100644 index 00000000..ce701c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Default.xml new file mode 100644 index 00000000..4d04e391 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return --value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Latest.cs new file mode 100644 index 00000000..ce701c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Latest.xml new file mode 100644 index 00000000..4d04e391 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return --value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Preview.cs new file mode 100644 index 00000000..ce701c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Preview.xml new file mode 100644 index 00000000..4d04e391 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return --value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Compatible.cs new file mode 100644 index 00000000..ce701c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Compatible.xml new file mode 100644 index 00000000..4d04e391 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return --value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Default.cs new file mode 100644 index 00000000..ce701c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Default.xml new file mode 100644 index 00000000..4d04e391 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return --value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Latest.cs new file mode 100644 index 00000000..ce701c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Latest.xml new file mode 100644 index 00000000..4d04e391 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return --value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Preview.cs new file mode 100644 index 00000000..ce701c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Preview.xml new file mode 100644 index 00000000..4d04e391 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.--.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return --value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Compatible.cs new file mode 100644 index 00000000..6ba428f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Compatible.xml new file mode 100644 index 00000000..ef280ce3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return -value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Default.cs new file mode 100644 index 00000000..6ba428f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Default.xml new file mode 100644 index 00000000..ef280ce3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return -value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Latest.cs new file mode 100644 index 00000000..6ba428f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Latest.xml new file mode 100644 index 00000000..ef280ce3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return -value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Preview.cs new file mode 100644 index 00000000..6ba428f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Preview.xml new file mode 100644 index 00000000..ef280ce3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return -value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Compatible.cs new file mode 100644 index 00000000..6ba428f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Compatible.xml new file mode 100644 index 00000000..ef280ce3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return -value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Default.cs new file mode 100644 index 00000000..6ba428f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Default.xml new file mode 100644 index 00000000..ef280ce3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return -value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Latest.cs new file mode 100644 index 00000000..6ba428f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Latest.xml new file mode 100644 index 00000000..ef280ce3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return -value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Preview.cs new file mode 100644 index 00000000..6ba428f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Preview.xml new file mode 100644 index 00000000..ef280ce3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.-.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return -value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Compatible.cs new file mode 100644 index 00000000..08e3ad37 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Compatible.xml new file mode 100644 index 00000000..2052122e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ~value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Default.cs new file mode 100644 index 00000000..08e3ad37 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Default.xml new file mode 100644 index 00000000..2052122e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ~value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Latest.cs new file mode 100644 index 00000000..08e3ad37 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Latest.xml new file mode 100644 index 00000000..2052122e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ~value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Preview.cs new file mode 100644 index 00000000..08e3ad37 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Preview.xml new file mode 100644 index 00000000..2052122e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Unix.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ~value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Compatible.cs new file mode 100644 index 00000000..08e3ad37 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Compatible.xml new file mode 100644 index 00000000..2052122e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Compatible.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ~value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Default.cs new file mode 100644 index 00000000..08e3ad37 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Default.xml new file mode 100644 index 00000000..2052122e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Default.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ~value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Latest.cs new file mode 100644 index 00000000..08e3ad37 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Latest.xml new file mode 100644 index 00000000..2052122e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Latest.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ~value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Preview.cs new file mode 100644 index 00000000..08e3ad37 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Preview.xml new file mode 100644 index 00000000..2052122e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.UnaryOperatorPrefixTest.~.Windows.Preview.xml @@ -0,0 +1,14 @@ + + + + + + int + + int + + return ~value; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Compatible.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Compatible.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Default.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Default.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Default.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Latest.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Latest.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Preview.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Preview.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Compatible.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Compatible.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Default.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Default.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Default.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Latest.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Latest.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Preview.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Preview.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileNonCompoundTest.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Compatible.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Compatible.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Default.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Default.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/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Default.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Default.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Latest.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Latest.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/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Latest.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Preview.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Preview.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/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Preview.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Compatible.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Compatible.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/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Compatible.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Compatible.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Default.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Default.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/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Default.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Default.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Latest.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Latest.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/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Latest.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Preview.cs new file mode 100644 index 00000000..6b312efe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Preview.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/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Preview.xml new file mode 100644 index 00000000..5ab45ec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationBodyImportTest.WhileTest.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + int + + int i = 0; + + while (i < count) + { + i++; + } + + return i; + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Compatible.cs new file mode 100644 index 00000000..cf956dad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Compatible.xml new file mode 100644 index 00000000..124f6df9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + void + + float* + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Default.cs new file mode 100644 index 00000000..cf956dad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.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("const float[4]")] float* color); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Default.xml new file mode 100644 index 00000000..124f6df9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + void + + float* + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Latest.cs new file mode 100644 index 00000000..cf956dad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.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("const float[4]")] float* color); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Latest.xml new file mode 100644 index 00000000..124f6df9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + void + + float* + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Preview.cs new file mode 100644 index 00000000..cf956dad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.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("const float[4]")] float* color); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Preview.xml new file mode 100644 index 00000000..124f6df9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + void + + float* + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Compatible.cs new file mode 100644 index 00000000..cf956dad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Compatible.xml new file mode 100644 index 00000000..124f6df9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + void + + float* + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Default.cs new file mode 100644 index 00000000..cf956dad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.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("const float[4]")] float* color); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Default.xml new file mode 100644 index 00000000..124f6df9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + void + + float* + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Latest.cs new file mode 100644 index 00000000..cf956dad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.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("const float[4]")] float* color); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Latest.xml new file mode 100644 index 00000000..124f6df9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + void + + float* + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Preview.cs new file mode 100644 index 00000000..cf956dad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.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("const float[4]")] float* color); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Preview.xml new file mode 100644 index 00000000..124f6df9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.ArrayParameterTest.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + void + + float* + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Compatible.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Compatible.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Default.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Default.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Latest.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Latest.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Latest.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Preview.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Preview.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Unix.Preview.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Compatible.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Compatible.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Default.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Default.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Latest.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Latest.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Latest.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Preview.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Preview.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.BasicTest.Windows.Preview.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Compatible.cs new file mode 100644 index 00000000..5aecb089 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.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/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Compatible.xml new file mode 100644 index 00000000..d5241fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + void + + IntPtr + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Default.cs new file mode 100644 index 00000000..cae5558f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.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/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Default.xml new file mode 100644 index 00000000..1e150afd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + void + + delegate* unmanaged[Cdecl]<void> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Latest.cs new file mode 100644 index 00000000..cae5558f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.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/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Latest.xml new file mode 100644 index 00000000..1e150afd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + void + + delegate* unmanaged[Cdecl]<void> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Preview.cs new file mode 100644 index 00000000..cae5558f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.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/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Preview.xml new file mode 100644 index 00000000..1e150afd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + void + + delegate* unmanaged[Cdecl]<void> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Compatible.cs new file mode 100644 index 00000000..5aecb089 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.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/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Compatible.xml new file mode 100644 index 00000000..d5241fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + void + + IntPtr + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Default.cs new file mode 100644 index 00000000..cae5558f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.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/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Default.xml new file mode 100644 index 00000000..1e150afd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + void + + delegate* unmanaged[Cdecl]<void> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Latest.cs new file mode 100644 index 00000000..cae5558f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.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/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Latest.xml new file mode 100644 index 00000000..1e150afd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + void + + delegate* unmanaged[Cdecl]<void> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Preview.cs new file mode 100644 index 00000000..cae5558f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.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/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Preview.xml new file mode 100644 index 00000000..1e150afd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.FunctionPointerParameterTest.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + void + + delegate* unmanaged[Cdecl]<void> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Unix.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.IntrinsicsTest.Windows.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Compatible.cs new file mode 100644 index 00000000..c8c39e8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Compatible.xml new file mode 100644 index 00000000..3d7417e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Default.cs new file mode 100644 index 00000000..c8c39e8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Default.xml new file mode 100644 index 00000000..3d7417e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Latest.cs new file mode 100644 index 00000000..c8c39e8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Latest.xml new file mode 100644 index 00000000..3d7417e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Latest.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Preview.cs new file mode 100644 index 00000000..c8c39e8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Preview.xml new file mode 100644 index 00000000..3d7417e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Unix.Preview.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Compatible.cs new file mode 100644 index 00000000..4e9cf387 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Compatible.xml new file mode 100644 index 00000000..106886c3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Default.cs new file mode 100644 index 00000000..4e9cf387 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Default.xml new file mode 100644 index 00000000..106886c3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Latest.cs new file mode 100644 index 00000000..4e9cf387 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Latest.xml new file mode 100644 index 00000000..106886c3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Latest.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Preview.cs new file mode 100644 index 00000000..4e9cf387 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Preview.xml new file mode 100644 index 00000000..106886c3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NamespaceTest.Windows.Preview.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Compatible.cs new file mode 100644 index 00000000..110bdece --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Compatible.xml new file mode 100644 index 00000000..3467d386 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Default.cs new file mode 100644 index 00000000..110bdece --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Default.xml new file mode 100644 index 00000000..3467d386 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Latest.cs new file mode 100644 index 00000000..110bdece --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Latest.xml new file mode 100644 index 00000000..3467d386 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Latest.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Preview.cs new file mode 100644 index 00000000..110bdece --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Preview.xml new file mode 100644 index 00000000..3467d386 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Unix.Preview.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Compatible.cs new file mode 100644 index 00000000..110bdece --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Compatible.xml new file mode 100644 index 00000000..3467d386 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Default.cs new file mode 100644 index 00000000..110bdece --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Default.xml new file mode 100644 index 00000000..3467d386 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Latest.cs new file mode 100644 index 00000000..110bdece --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Latest.xml new file mode 100644 index 00000000..3467d386 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Latest.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Preview.cs new file mode 100644 index 00000000..110bdece --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Preview.xml new file mode 100644 index 00000000..3467d386 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.NoLibraryPathTest.Windows.Preview.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Compatible.cs new file mode 100644 index 00000000..4f6962a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Compatible.xml new file mode 100644 index 00000000..434748da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + double + + 1.0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Default.cs new file mode 100644 index 00000000..4f6962a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Default.xml new file mode 100644 index 00000000..434748da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + double + + 1.0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Latest.cs new file mode 100644 index 00000000..4f6962a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Latest.xml new file mode 100644 index 00000000..434748da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + double + + 1.0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Preview.cs new file mode 100644 index 00000000..4f6962a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Preview.xml new file mode 100644 index 00000000..434748da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + double + + 1.0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Compatible.cs new file mode 100644 index 00000000..4f6962a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Compatible.xml new file mode 100644 index 00000000..434748da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + double + + 1.0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Default.cs new file mode 100644 index 00000000..4f6962a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Default.xml new file mode 100644 index 00000000..434748da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + double + + 1.0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Latest.cs new file mode 100644 index 00000000..4f6962a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Latest.xml new file mode 100644 index 00000000..434748da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + double + + 1.0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Preview.cs new file mode 100644 index 00000000..4f6962a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Preview.xml new file mode 100644 index 00000000..434748da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.double.1.0.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + double + + 1.0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Compatible.cs new file mode 100644 index 00000000..8fee3301 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Compatible.xml new file mode 100644 index 00000000..ad872907 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + float + + 6.0f + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Default.cs new file mode 100644 index 00000000..8fee3301 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Default.xml new file mode 100644 index 00000000..ad872907 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + float + + 6.0f + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Latest.cs new file mode 100644 index 00000000..8fee3301 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Latest.xml new file mode 100644 index 00000000..ad872907 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + float + + 6.0f + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Preview.cs new file mode 100644 index 00000000..8fee3301 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Preview.xml new file mode 100644 index 00000000..ad872907 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + float + + 6.0f + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Compatible.cs new file mode 100644 index 00000000..8fee3301 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Compatible.xml new file mode 100644 index 00000000..ad872907 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + float + + 6.0f + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Default.cs new file mode 100644 index 00000000..8fee3301 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Default.xml new file mode 100644 index 00000000..ad872907 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + float + + 6.0f + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Latest.cs new file mode 100644 index 00000000..8fee3301 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Latest.xml new file mode 100644 index 00000000..ad872907 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + float + + 6.0f + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Preview.cs new file mode 100644 index 00000000..8fee3301 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Preview.xml new file mode 100644 index 00000000..ad872907 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.float.6.0f.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + float + + 6.0f + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Compatible.cs new file mode 100644 index 00000000..b457f236 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Compatible.xml new file mode 100644 index 00000000..e1479328 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + int + + 3 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Default.cs new file mode 100644 index 00000000..b457f236 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Default.xml new file mode 100644 index 00000000..e1479328 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + int + + 3 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Latest.cs new file mode 100644 index 00000000..b457f236 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Latest.xml new file mode 100644 index 00000000..e1479328 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + int + + 3 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Preview.cs new file mode 100644 index 00000000..b457f236 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Preview.xml new file mode 100644 index 00000000..e1479328 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + int + + 3 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Compatible.cs new file mode 100644 index 00000000..b457f236 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Compatible.xml new file mode 100644 index 00000000..e1479328 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + int + + 3 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Default.cs new file mode 100644 index 00000000..b457f236 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Default.xml new file mode 100644 index 00000000..e1479328 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + int + + 3 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Latest.cs new file mode 100644 index 00000000..b457f236 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Latest.xml new file mode 100644 index 00000000..e1479328 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + int + + 3 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Preview.cs new file mode 100644 index 00000000..b457f236 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Preview.xml new file mode 100644 index 00000000..e1479328 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.int.3.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + int + + 3 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Compatible.cs new file mode 100644 index 00000000..6733966f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Compatible.xml new file mode 100644 index 00000000..a8289cca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + long + + 4 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Default.cs new file mode 100644 index 00000000..6733966f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Default.xml new file mode 100644 index 00000000..a8289cca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + long + + 4 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Latest.cs new file mode 100644 index 00000000..6733966f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Latest.xml new file mode 100644 index 00000000..a8289cca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + long + + 4 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Preview.cs new file mode 100644 index 00000000..6733966f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Preview.xml new file mode 100644 index 00000000..a8289cca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + long + + 4 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Compatible.cs new file mode 100644 index 00000000..6733966f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Compatible.xml new file mode 100644 index 00000000..a8289cca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + long + + 4 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Default.cs new file mode 100644 index 00000000..6733966f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Default.xml new file mode 100644 index 00000000..a8289cca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + long + + 4 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Latest.cs new file mode 100644 index 00000000..6733966f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Latest.xml new file mode 100644 index 00000000..a8289cca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + long + + 4 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Preview.cs new file mode 100644 index 00000000..6733966f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Preview.xml new file mode 100644 index 00000000..a8289cca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.long long.4.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + long + + 4 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Compatible.cs new file mode 100644 index 00000000..481abfcb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Compatible.xml new file mode 100644 index 00000000..d70108cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + short + + 2 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Default.cs new file mode 100644 index 00000000..481abfcb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Default.xml new file mode 100644 index 00000000..d70108cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + short + + 2 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Latest.cs new file mode 100644 index 00000000..481abfcb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Latest.xml new file mode 100644 index 00000000..d70108cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + short + + 2 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Preview.cs new file mode 100644 index 00000000..481abfcb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Preview.xml new file mode 100644 index 00000000..d70108cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + short + + 2 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Compatible.cs new file mode 100644 index 00000000..481abfcb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Compatible.xml new file mode 100644 index 00000000..d70108cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + short + + 2 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Default.cs new file mode 100644 index 00000000..481abfcb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Default.xml new file mode 100644 index 00000000..d70108cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + short + + 2 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Latest.cs new file mode 100644 index 00000000..481abfcb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Latest.xml new file mode 100644 index 00000000..d70108cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + short + + 2 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Preview.cs new file mode 100644 index 00000000..481abfcb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Preview.xml new file mode 100644 index 00000000..d70108cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.short.2.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + short + + 2 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Compatible.cs new file mode 100644 index 00000000..e92ee043 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Compatible.xml new file mode 100644 index 00000000..e1e939f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + sbyte + + 5 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Default.cs new file mode 100644 index 00000000..e92ee043 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Default.xml new file mode 100644 index 00000000..e1e939f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + sbyte + + 5 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Latest.cs new file mode 100644 index 00000000..e92ee043 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Latest.xml new file mode 100644 index 00000000..e1e939f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + sbyte + + 5 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Preview.cs new file mode 100644 index 00000000..e92ee043 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Preview.xml new file mode 100644 index 00000000..e1e939f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + sbyte + + 5 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Compatible.cs new file mode 100644 index 00000000..e92ee043 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Compatible.xml new file mode 100644 index 00000000..e1e939f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + sbyte + + 5 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Default.cs new file mode 100644 index 00000000..e92ee043 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Default.xml new file mode 100644 index 00000000..e1e939f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + sbyte + + 5 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Latest.cs new file mode 100644 index 00000000..e92ee043 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Latest.xml new file mode 100644 index 00000000..e1e939f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + sbyte + + 5 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Preview.cs new file mode 100644 index 00000000..e92ee043 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Preview.xml new file mode 100644 index 00000000..e1e939f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.signed char.5.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + sbyte + + 5 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Compatible.cs new file mode 100644 index 00000000..f776ee3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Compatible.xml new file mode 100644 index 00000000..ded85895 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + byte + + 0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Default.cs new file mode 100644 index 00000000..f776ee3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Default.xml new file mode 100644 index 00000000..ded85895 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + byte + + 0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Latest.cs new file mode 100644 index 00000000..f776ee3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Latest.xml new file mode 100644 index 00000000..ded85895 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + byte + + 0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Preview.cs new file mode 100644 index 00000000..f776ee3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Preview.xml new file mode 100644 index 00000000..ded85895 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + byte + + 0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Compatible.cs new file mode 100644 index 00000000..f776ee3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Compatible.xml new file mode 100644 index 00000000..ded85895 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + byte + + 0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Default.cs new file mode 100644 index 00000000..f776ee3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Default.xml new file mode 100644 index 00000000..ded85895 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + byte + + 0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Latest.cs new file mode 100644 index 00000000..f776ee3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Latest.xml new file mode 100644 index 00000000..ded85895 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + byte + + 0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Preview.cs new file mode 100644 index 00000000..f776ee3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Preview.xml new file mode 100644 index 00000000..ded85895 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned char.0.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + byte + + 0 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Compatible.cs new file mode 100644 index 00000000..39fca763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Compatible.xml new file mode 100644 index 00000000..06e86e5b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + uint + + 8 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Default.cs new file mode 100644 index 00000000..39fca763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Default.xml new file mode 100644 index 00000000..06e86e5b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + uint + + 8 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Latest.cs new file mode 100644 index 00000000..39fca763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Latest.xml new file mode 100644 index 00000000..06e86e5b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + uint + + 8 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Preview.cs new file mode 100644 index 00000000..39fca763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Preview.xml new file mode 100644 index 00000000..06e86e5b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + uint + + 8 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Compatible.cs new file mode 100644 index 00000000..39fca763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Compatible.xml new file mode 100644 index 00000000..06e86e5b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + uint + + 8 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Default.cs new file mode 100644 index 00000000..39fca763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Default.xml new file mode 100644 index 00000000..06e86e5b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + uint + + 8 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Latest.cs new file mode 100644 index 00000000..39fca763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Latest.xml new file mode 100644 index 00000000..06e86e5b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + uint + + 8 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Preview.cs new file mode 100644 index 00000000..39fca763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Preview.xml new file mode 100644 index 00000000..06e86e5b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned int.8.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + uint + + 8 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Compatible.cs new file mode 100644 index 00000000..dd6bff3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Compatible.xml new file mode 100644 index 00000000..a9dfb811 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + ulong + + 9 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Default.cs new file mode 100644 index 00000000..dd6bff3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Default.xml new file mode 100644 index 00000000..a9dfb811 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + ulong + + 9 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Latest.cs new file mode 100644 index 00000000..dd6bff3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Latest.xml new file mode 100644 index 00000000..a9dfb811 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + ulong + + 9 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Preview.cs new file mode 100644 index 00000000..dd6bff3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Preview.xml new file mode 100644 index 00000000..a9dfb811 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + ulong + + 9 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Compatible.cs new file mode 100644 index 00000000..dd6bff3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Compatible.xml new file mode 100644 index 00000000..a9dfb811 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + ulong + + 9 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Default.cs new file mode 100644 index 00000000..dd6bff3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Default.xml new file mode 100644 index 00000000..a9dfb811 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + ulong + + 9 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Latest.cs new file mode 100644 index 00000000..dd6bff3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Latest.xml new file mode 100644 index 00000000..a9dfb811 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + ulong + + 9 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Preview.cs new file mode 100644 index 00000000..dd6bff3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Preview.xml new file mode 100644 index 00000000..a9dfb811 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned long long.9.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + ulong + + 9 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Compatible.cs new file mode 100644 index 00000000..53d3d607 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Compatible.xml new file mode 100644 index 00000000..2c3638e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + (byte)('A') + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Default.cs new file mode 100644 index 00000000..53d3d607 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Default.xml new file mode 100644 index 00000000..2c3638e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + (byte)('A') + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Latest.cs new file mode 100644 index 00000000..53d3d607 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Latest.xml new file mode 100644 index 00000000..2c3638e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + (byte)('A') + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Preview.cs new file mode 100644 index 00000000..53d3d607 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Preview.xml new file mode 100644 index 00000000..2c3638e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + (byte)('A') + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Compatible.cs new file mode 100644 index 00000000..53d3d607 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Compatible.xml new file mode 100644 index 00000000..2c3638e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + (byte)('A') + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Default.cs new file mode 100644 index 00000000..53d3d607 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Default.xml new file mode 100644 index 00000000..2c3638e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + (byte)('A') + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Latest.cs new file mode 100644 index 00000000..53d3d607 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Latest.xml new file mode 100644 index 00000000..2c3638e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + (byte)('A') + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Preview.cs new file mode 100644 index 00000000..53d3d607 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Preview.xml new file mode 100644 index 00000000..2c3638e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.'A'.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + (byte)('A') + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Compatible.cs new file mode 100644 index 00000000..d00e0b33 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Compatible.xml new file mode 100644 index 00000000..5b2ed8b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + 7 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Default.cs new file mode 100644 index 00000000..d00e0b33 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Default.xml new file mode 100644 index 00000000..5b2ed8b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + 7 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Latest.cs new file mode 100644 index 00000000..d00e0b33 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Latest.xml new file mode 100644 index 00000000..5b2ed8b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + 7 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Preview.cs new file mode 100644 index 00000000..d00e0b33 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Preview.xml new file mode 100644 index 00000000..5b2ed8b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + 7 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Compatible.cs new file mode 100644 index 00000000..d00e0b33 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Compatible.xml new file mode 100644 index 00000000..5b2ed8b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + 7 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Default.cs new file mode 100644 index 00000000..d00e0b33 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Default.xml new file mode 100644 index 00000000..5b2ed8b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + 7 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Latest.cs new file mode 100644 index 00000000..d00e0b33 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Latest.xml new file mode 100644 index 00000000..5b2ed8b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + 7 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Preview.cs new file mode 100644 index 00000000..d00e0b33 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Preview.xml new file mode 100644 index 00000000..5b2ed8b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterTest.unsigned short.7.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + ushort + + 7 + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Compatible.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Compatible.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Default.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.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(void* value = null); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Default.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Latest.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.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(void* value = null); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Latest.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Preview.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.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(void* value = null); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Preview.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Compatible.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Compatible.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Default.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.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(void* value = null); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Default.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Latest.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.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(void* value = null); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Latest.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Preview.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.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(void* value = null); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Preview.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.0.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Compatible.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Compatible.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Default.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.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(void* value = null); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Default.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Latest.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.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(void* value = null); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Latest.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Preview.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.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(void* value = null); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Preview.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Compatible.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Compatible.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Default.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.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(void* value = null); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Default.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Latest.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.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(void* value = null); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Latest.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Preview.cs new file mode 100644 index 00000000..e2ad5416 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.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(void* value = null); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Preview.xml new file mode 100644 index 00000000..29a1fe64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.OptionalParameterUnsafeTest.void __ast.nullptr.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + void + + void* + + null + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Compatible.cs new file mode 100644 index 00000000..411ac5af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Compatible.xml new file mode 100644 index 00000000..a634dd3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + void + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Default.cs new file mode 100644 index 00000000..411ac5af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Default.xml new file mode 100644 index 00000000..a634dd3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + void + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Latest.cs new file mode 100644 index 00000000..411ac5af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Latest.xml new file mode 100644 index 00000000..a634dd3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + void + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Preview.cs new file mode 100644 index 00000000..411ac5af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Preview.xml new file mode 100644 index 00000000..a634dd3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + void + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Compatible.cs new file mode 100644 index 00000000..411ac5af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Compatible.xml new file mode 100644 index 00000000..a634dd3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + void + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Default.cs new file mode 100644 index 00000000..411ac5af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Default.xml new file mode 100644 index 00000000..a634dd3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + void + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Latest.cs new file mode 100644 index 00000000..411ac5af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Latest.xml new file mode 100644 index 00000000..a634dd3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + void + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Preview.cs new file mode 100644 index 00000000..411ac5af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Preview.xml new file mode 100644 index 00000000..a634dd3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.SourceLocationTest.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + void + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Compatible.cs new file mode 100644 index 00000000..2a6c1392 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Compatible.xml new file mode 100644 index 00000000..167460dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + MyTemplate<IntPtr> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Default.cs new file mode 100644 index 00000000..2a6c1392 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Default.xml new file mode 100644 index 00000000..167460dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + MyTemplate<IntPtr> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Latest.cs new file mode 100644 index 00000000..2a6c1392 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Latest.xml new file mode 100644 index 00000000..167460dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Latest.xml @@ -0,0 +1,10 @@ + + + + + + MyTemplate<IntPtr> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Preview.cs new file mode 100644 index 00000000..2a6c1392 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Preview.xml new file mode 100644 index 00000000..167460dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Unix.Preview.xml @@ -0,0 +1,10 @@ + + + + + + MyTemplate<IntPtr> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Compatible.cs new file mode 100644 index 00000000..2a6c1392 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Compatible.xml new file mode 100644 index 00000000..167460dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + MyTemplate<IntPtr> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Default.cs new file mode 100644 index 00000000..2a6c1392 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Default.xml new file mode 100644 index 00000000..167460dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + MyTemplate<IntPtr> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Latest.cs new file mode 100644 index 00000000..2a6c1392 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Latest.xml new file mode 100644 index 00000000..167460dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Latest.xml @@ -0,0 +1,10 @@ + + + + + + MyTemplate<IntPtr> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Preview.cs new file mode 100644 index 00000000..2a6c1392 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Preview.xml new file mode 100644 index 00000000..167460dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateMemberTest.Windows.Preview.xml @@ -0,0 +1,10 @@ + + + + + + MyTemplate<IntPtr> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Compatible.cs new file mode 100644 index 00000000..e4d44b39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Compatible.xml new file mode 100644 index 00000000..d13558df --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<byte> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Default.cs new file mode 100644 index 00000000..e4d44b39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Default.xml new file mode 100644 index 00000000..d13558df --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<byte> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Latest.cs new file mode 100644 index 00000000..e4d44b39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Latest.xml new file mode 100644 index 00000000..d13558df --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<byte> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Preview.cs new file mode 100644 index 00000000..e4d44b39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Preview.xml new file mode 100644 index 00000000..d13558df --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<byte> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Compatible.cs new file mode 100644 index 00000000..e4d44b39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Compatible.xml new file mode 100644 index 00000000..d13558df --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<byte> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Default.cs new file mode 100644 index 00000000..e4d44b39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Default.xml new file mode 100644 index 00000000..d13558df --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<byte> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Latest.cs new file mode 100644 index 00000000..e4d44b39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Latest.xml new file mode 100644 index 00000000..d13558df --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<byte> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Preview.cs new file mode 100644 index 00000000..e4d44b39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Preview.xml new file mode 100644 index 00000000..d13558df --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.bool.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<byte> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Compatible.cs new file mode 100644 index 00000000..525bd015 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.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("MyTemplate")] MyTemplate myStruct); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Compatible.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Default.cs new file mode 100644 index 00000000..525bd015 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Default.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Latest.cs new file mode 100644 index 00000000..525bd015 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Latest.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Preview.cs new file mode 100644 index 00000000..525bd015 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Preview.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Compatible.cs new file mode 100644 index 00000000..525bd015 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.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("MyTemplate")] MyTemplate myStruct); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Compatible.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Default.cs new file mode 100644 index 00000000..525bd015 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Default.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Latest.cs new file mode 100644 index 00000000..525bd015 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Latest.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Preview.cs new file mode 100644 index 00000000..525bd015 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Preview.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.float __ast.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..15cde60a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..8624f9b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<int> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Default.cs new file mode 100644 index 00000000..15cde60a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Default.xml new file mode 100644 index 00000000..8624f9b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<int> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Latest.cs new file mode 100644 index 00000000..15cde60a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Latest.xml new file mode 100644 index 00000000..8624f9b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<int> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Preview.cs new file mode 100644 index 00000000..15cde60a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Preview.xml new file mode 100644 index 00000000..8624f9b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<int> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..15cde60a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..8624f9b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<int> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Default.cs new file mode 100644 index 00000000..15cde60a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Default.xml new file mode 100644 index 00000000..8624f9b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<int> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Latest.cs new file mode 100644 index 00000000..15cde60a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Latest.xml new file mode 100644 index 00000000..8624f9b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<int> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Preview.cs new file mode 100644 index 00000000..15cde60a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Preview.xml new file mode 100644 index 00000000..8624f9b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.int.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<int> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Compatible.cs new file mode 100644 index 00000000..a312e7e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.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("MyTemplate")] MyTemplate myStruct); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Compatible.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Default.cs new file mode 100644 index 00000000..a312e7e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Default.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Latest.cs new file mode 100644 index 00000000..a312e7e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Latest.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Preview.cs new file mode 100644 index 00000000..a312e7e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Preview.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Compatible.cs new file mode 100644 index 00000000..a312e7e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.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("MyTemplate")] MyTemplate myStruct); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Compatible.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Default.cs new file mode 100644 index 00000000..a312e7e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Default.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Latest.cs new file mode 100644 index 00000000..a312e7e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Latest.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Preview.cs new file mode 100644 index 00000000..a312e7e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Preview.xml new file mode 100644 index 00000000..01eb189c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.TemplateParameterTest.void (__ast)(int).Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + void + + MyTemplate<IntPtr> + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Compatible.cs new file mode 100644 index 00000000..92091a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Compatible.xml new file mode 100644 index 00000000..4c9c5dd5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Default.cs new file mode 100644 index 00000000..92091a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Default.xml new file mode 100644 index 00000000..4c9c5dd5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Latest.cs new file mode 100644 index 00000000..92091a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Latest.xml new file mode 100644 index 00000000..4c9c5dd5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Preview.cs new file mode 100644 index 00000000..92091a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Preview.xml new file mode 100644 index 00000000..4c9c5dd5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Compatible.cs new file mode 100644 index 00000000..92091a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Compatible.xml new file mode 100644 index 00000000..4c9c5dd5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Default.cs new file mode 100644 index 00000000..92091a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Default.xml new file mode 100644 index 00000000..4c9c5dd5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Latest.cs new file mode 100644 index 00000000..92091a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Latest.xml new file mode 100644 index 00000000..4c9c5dd5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Preview.cs new file mode 100644 index 00000000..92091a8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Preview.xml new file mode 100644 index 00000000..4c9c5dd5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarOverrideTest.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Compatible.cs new file mode 100644 index 00000000..85f6e126 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Compatible.xml new file mode 100644 index 00000000..fbb515ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Default.cs new file mode 100644 index 00000000..85f6e126 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Default.xml new file mode 100644 index 00000000..fbb515ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Latest.cs new file mode 100644 index 00000000..85f6e126 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Latest.xml new file mode 100644 index 00000000..fbb515ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Preview.cs new file mode 100644 index 00000000..85f6e126 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Preview.xml new file mode 100644 index 00000000..fbb515ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Compatible.cs new file mode 100644 index 00000000..85f6e126 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Compatible.xml new file mode 100644 index 00000000..fbb515ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Default.cs new file mode 100644 index 00000000..85f6e126 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Default.xml new file mode 100644 index 00000000..fbb515ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Latest.cs new file mode 100644 index 00000000..85f6e126 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Latest.xml new file mode 100644 index 00000000..fbb515ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Preview.cs new file mode 100644 index 00000000..85f6e126 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Preview.xml new file mode 100644 index 00000000..fbb515ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvStarTest.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Compatible.cs new file mode 100644 index 00000000..77789cfe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Compatible.xml new file mode 100644 index 00000000..66d23f21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Default.cs new file mode 100644 index 00000000..77789cfe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Default.xml new file mode 100644 index 00000000..66d23f21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Latest.cs new file mode 100644 index 00000000..77789cfe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Latest.xml new file mode 100644 index 00000000..66d23f21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Preview.cs new file mode 100644 index 00000000..77789cfe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Preview.xml new file mode 100644 index 00000000..66d23f21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Compatible.cs new file mode 100644 index 00000000..77789cfe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Compatible.xml new file mode 100644 index 00000000..66d23f21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Default.cs new file mode 100644 index 00000000..77789cfe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Default.xml new file mode 100644 index 00000000..66d23f21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Latest.cs new file mode 100644 index 00000000..77789cfe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Latest.xml new file mode 100644 index 00000000..66d23f21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Preview.cs new file mode 100644 index 00000000..77789cfe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Preview.xml new file mode 100644 index 00000000..66d23f21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithCallConvTest.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Compatible.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Compatible.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Default.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Default.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Latest.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Latest.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Latest.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Preview.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Preview.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Unix.Preview.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Compatible.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Compatible.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Default.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Default.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Latest.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Latest.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Latest.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Preview.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Preview.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathStarTest.Windows.Preview.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Compatible.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Compatible.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Default.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Default.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Latest.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Latest.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Latest.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Preview.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Preview.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Unix.Preview.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Compatible.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Compatible.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Default.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Default.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Latest.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Latest.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Latest.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Preview.cs new file mode 100644 index 00000000..e1bfab2e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Preview.xml new file mode 100644 index 00000000..1dfcf83d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithLibraryPathTest.Windows.Preview.xml @@ -0,0 +1,10 @@ + + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Compatible.cs new file mode 100644 index 00000000..72c1144d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Compatible.xml new file mode 100644 index 00000000..ee7e2b73 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Default.cs new file mode 100644 index 00000000..72c1144d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Default.xml new file mode 100644 index 00000000..ee7e2b73 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Latest.cs new file mode 100644 index 00000000..72c1144d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Latest.xml new file mode 100644 index 00000000..ee7e2b73 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Preview.cs new file mode 100644 index 00000000..72c1144d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Preview.xml new file mode 100644 index 00000000..ee7e2b73 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Compatible.cs new file mode 100644 index 00000000..72c1144d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Compatible.xml new file mode 100644 index 00000000..ee7e2b73 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Default.cs new file mode 100644 index 00000000..72c1144d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Default.xml new file mode 100644 index 00000000..ee7e2b73 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Latest.cs new file mode 100644 index 00000000..72c1144d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Latest.xml new file mode 100644 index 00000000..ee7e2b73 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Preview.cs new file mode 100644 index 00000000..72c1144d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Preview.xml new file mode 100644 index 00000000..ee7e2b73 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorStarTest.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Compatible.cs new file mode 100644 index 00000000..56de16d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Compatible.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Compatible.xml new file mode 100644 index 00000000..f25321b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Default.cs new file mode 100644 index 00000000..56de16d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Default.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Default.xml new file mode 100644 index 00000000..f25321b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Latest.cs new file mode 100644 index 00000000..56de16d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Latest.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Latest.xml new file mode 100644 index 00000000..f25321b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Preview.cs new file mode 100644 index 00000000..56de16d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Preview.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Preview.xml new file mode 100644 index 00000000..f25321b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Compatible.cs new file mode 100644 index 00000000..56de16d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Compatible.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Compatible.xml new file mode 100644 index 00000000..f25321b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Default.cs new file mode 100644 index 00000000..56de16d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Default.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Default.xml new file mode 100644 index 00000000..f25321b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Latest.cs new file mode 100644 index 00000000..56de16d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Latest.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Latest.xml new file mode 100644 index 00000000..f25321b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Preview.cs new file mode 100644 index 00000000..56de16d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Preview.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/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Preview.xml new file mode 100644 index 00000000..f25321b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionDeclarationDllImportTest.WithSetLastErrorTest.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + void + + int + + + + void + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Compatible.cs new file mode 100644 index 00000000..283d4fce --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.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/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Compatible.xml new file mode 100644 index 00000000..c7ca8ecc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + void + + + + IntPtr + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Default.cs new file mode 100644 index 00000000..ab439a0b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.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/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Default.xml new file mode 100644 index 00000000..fc11a560 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Latest.cs new file mode 100644 index 00000000..ab439a0b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.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/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Latest.xml new file mode 100644 index 00000000..fc11a560 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Latest.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Preview.cs new file mode 100644 index 00000000..ab439a0b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.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/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Preview.xml new file mode 100644 index 00000000..fc11a560 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Unix.Preview.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Compatible.cs new file mode 100644 index 00000000..283d4fce --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.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/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Compatible.xml new file mode 100644 index 00000000..c7ca8ecc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + void + + + + IntPtr + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Default.cs new file mode 100644 index 00000000..ab439a0b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.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/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Default.xml new file mode 100644 index 00000000..fc11a560 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Latest.cs new file mode 100644 index 00000000..ab439a0b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.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/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Latest.xml new file mode 100644 index 00000000..fc11a560 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Latest.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Preview.cs new file mode 100644 index 00000000..ab439a0b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.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/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Preview.xml new file mode 100644 index 00000000..fc11a560 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.BasicTest.Windows.Preview.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Compatible.cs new file mode 100644 index 00000000..63fa8098 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.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/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Compatible.xml new file mode 100644 index 00000000..e73a7226 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + void + + + + IntPtr + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Default.cs new file mode 100644 index 00000000..e80d15e3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.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/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Default.xml new file mode 100644 index 00000000..8d530d3e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Stdcall]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Latest.cs new file mode 100644 index 00000000..e80d15e3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.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/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Latest.xml new file mode 100644 index 00000000..8d530d3e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Latest.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Stdcall]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Preview.cs new file mode 100644 index 00000000..e80d15e3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.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/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Preview.xml new file mode 100644 index 00000000..8d530d3e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Unix.Preview.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Stdcall]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Compatible.cs new file mode 100644 index 00000000..63fa8098 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.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/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Compatible.xml new file mode 100644 index 00000000..e73a7226 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + void + + + + IntPtr + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Default.cs new file mode 100644 index 00000000..e80d15e3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.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/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Default.xml new file mode 100644 index 00000000..8d530d3e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Stdcall]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Latest.cs new file mode 100644 index 00000000..e80d15e3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.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/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Latest.xml new file mode 100644 index 00000000..8d530d3e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Latest.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Stdcall]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Preview.cs new file mode 100644 index 00000000..e80d15e3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.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/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Preview.xml new file mode 100644 index 00000000..8d530d3e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.CallconvTest.Windows.Preview.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Stdcall]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Compatible.cs new file mode 100644 index 00000000..0cd46b9d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.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/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Compatible.xml new file mode 100644 index 00000000..ff657d34 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + void + + + + IntPtr + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Default.cs new file mode 100644 index 00000000..9182283e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.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/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Default.xml new file mode 100644 index 00000000..3aaad9f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Latest.cs new file mode 100644 index 00000000..9182283e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.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/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Latest.xml new file mode 100644 index 00000000..3aaad9f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Latest.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Preview.cs new file mode 100644 index 00000000..9182283e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.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/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Preview.xml new file mode 100644 index 00000000..3aaad9f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Unix.Preview.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Compatible.cs new file mode 100644 index 00000000..0cd46b9d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.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/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Compatible.xml new file mode 100644 index 00000000..ff657d34 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + void + + + + IntPtr + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Default.cs new file mode 100644 index 00000000..9182283e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.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/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Default.xml new file mode 100644 index 00000000..3aaad9f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Latest.cs new file mode 100644 index 00000000..9182283e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.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/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Latest.xml new file mode 100644 index 00000000..3aaad9f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Latest.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Preview.cs new file mode 100644 index 00000000..9182283e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.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/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Preview.xml new file mode 100644 index 00000000..3aaad9f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/FunctionPointerDeclarationTest.PointerlessTypedefTest.Windows.Preview.xml @@ -0,0 +1,10 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/OptionsTest.WithAttributes.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/OptionsTest.WithAttributes.Unix.Latest.cs new file mode 100644 index 00000000..2fa00c8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/OptionsTest.WithAttributes.Unix.Latest.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/Baselines/OptionsTest.WithAttributes.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/OptionsTest.WithAttributes.Windows.Latest.cs new file mode 100644 index 00000000..2fa00c8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/OptionsTest.WithAttributes.Windows.Latest.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/Baselines/OptionsTest.WithUsings.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/OptionsTest.WithUsings.Unix.Latest.cs new file mode 100644 index 00000000..7b282d5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/OptionsTest.WithUsings.Unix.Latest.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/Baselines/OptionsTest.WithUsings.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/OptionsTest.WithUsings.Windows.Latest.cs new file mode 100644 index 00000000..7b282d5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/OptionsTest.WithUsings.Windows.Latest.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/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Compatible.cs new file mode 100644 index 00000000..00f49ab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Compatible.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/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Compatible.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Default.cs new file mode 100644 index 00000000..00f49ab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Default.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/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Default.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Latest.cs new file mode 100644 index 00000000..00f49ab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Latest.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/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Latest.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Preview.cs new file mode 100644 index 00000000..00f49ab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Preview.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/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Preview.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/PInvokeGeneratorTest.SourceLocationAttributeTest2.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Compatible.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/Baselines/StructDeclarationTest.BasicTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Default.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Default.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/Baselines/StructDeclarationTest.BasicTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Default.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Latest.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Latest.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/Baselines/StructDeclarationTest.BasicTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Latest.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Preview.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Preview.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/Baselines/StructDeclarationTest.BasicTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Preview.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Compatible.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/Baselines/StructDeclarationTest.BasicTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Default.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Default.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/Baselines/StructDeclarationTest.BasicTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Default.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Latest.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Latest.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/Baselines/StructDeclarationTest.BasicTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Latest.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Preview.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Preview.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/Baselines/StructDeclarationTest.BasicTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Preview.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.double.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Compatible.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/Baselines/StructDeclarationTest.BasicTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Default.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Default.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/Baselines/StructDeclarationTest.BasicTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Default.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Latest.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Latest.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/Baselines/StructDeclarationTest.BasicTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Latest.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Preview.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Preview.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/Baselines/StructDeclarationTest.BasicTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Preview.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Compatible.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/Baselines/StructDeclarationTest.BasicTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Default.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Default.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/Baselines/StructDeclarationTest.BasicTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Default.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Latest.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Latest.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/Baselines/StructDeclarationTest.BasicTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Latest.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Preview.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Preview.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/Baselines/StructDeclarationTest.BasicTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Preview.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.float.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Compatible.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/Baselines/StructDeclarationTest.BasicTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Default.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Default.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/Baselines/StructDeclarationTest.BasicTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Default.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Latest.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Latest.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/Baselines/StructDeclarationTest.BasicTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Latest.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Preview.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Preview.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/Baselines/StructDeclarationTest.BasicTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Preview.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Compatible.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/Baselines/StructDeclarationTest.BasicTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Default.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Default.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/Baselines/StructDeclarationTest.BasicTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Default.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Latest.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Latest.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/Baselines/StructDeclarationTest.BasicTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Latest.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Preview.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Preview.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/Baselines/StructDeclarationTest.BasicTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Preview.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Compatible.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/Baselines/StructDeclarationTest.BasicTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Default.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Default.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/Baselines/StructDeclarationTest.BasicTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Default.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Latest.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Latest.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/Baselines/StructDeclarationTest.BasicTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Latest.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Preview.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Preview.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/Baselines/StructDeclarationTest.BasicTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Preview.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Compatible.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/Baselines/StructDeclarationTest.BasicTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Default.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Default.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/Baselines/StructDeclarationTest.BasicTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Default.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Latest.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Latest.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/Baselines/StructDeclarationTest.BasicTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Latest.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Preview.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Preview.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/Baselines/StructDeclarationTest.BasicTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Preview.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTest.short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Compatible.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Compatible.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/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Compatible.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Default.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Default.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/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Default.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Latest.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Latest.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/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Latest.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Preview.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Preview.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/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Preview.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Compatible.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Compatible.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/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Compatible.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Default.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Default.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/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Default.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Latest.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Latest.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/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Latest.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Preview.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Preview.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/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Preview.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.double.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Compatible.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Compatible.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/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Compatible.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Default.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Default.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/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Default.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Latest.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Latest.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/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Latest.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Preview.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Preview.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/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Preview.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Compatible.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Compatible.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/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Compatible.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Default.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Default.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/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Default.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Latest.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Latest.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/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Latest.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Preview.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Preview.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/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Preview.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.float.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Compatible.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Compatible.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/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Compatible.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Default.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Default.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/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Default.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Latest.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Latest.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/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Latest.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Preview.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Preview.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/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Preview.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Compatible.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Compatible.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/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Compatible.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Default.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Default.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/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Default.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Latest.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Latest.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/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Latest.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Preview.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Preview.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/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Preview.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Compatible.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Compatible.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/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Compatible.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Default.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Default.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/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Default.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Latest.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Latest.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/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Latest.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Preview.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Preview.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/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Preview.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Compatible.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Compatible.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/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Compatible.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Default.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Default.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/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Default.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Latest.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Latest.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/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Latest.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Preview.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Preview.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/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Preview.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicTestInCMode.short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.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/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Compatible.cs new file mode 100644 index 00000000..5e8a0844 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Compatible.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 o4_b22_1 + { + get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Compatible.xml new file mode 100644 index 00000000..e3d76dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Compatible.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/Baselines/StructDeclarationTest.BitfieldTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Default.cs new file mode 100644 index 00000000..28d96f58 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Default.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 o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Default.xml new file mode 100644 index 00000000..e3d76dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Default.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/Baselines/StructDeclarationTest.BitfieldTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Latest.cs new file mode 100644 index 00000000..28d96f58 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Latest.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 o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Latest.xml new file mode 100644 index 00000000..e3d76dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Latest.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/Baselines/StructDeclarationTest.BitfieldTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Preview.cs new file mode 100644 index 00000000..28d96f58 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Preview.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 o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Preview.xml new file mode 100644 index 00000000..e3d76dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Unix.Preview.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/Baselines/StructDeclarationTest.BitfieldTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Compatible.cs new file mode 100644 index 00000000..5e8a0844 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Compatible.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 o4_b22_1 + { + get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Compatible.xml new file mode 100644 index 00000000..e3d76dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Compatible.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/Baselines/StructDeclarationTest.BitfieldTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Default.cs new file mode 100644 index 00000000..28d96f58 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Default.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 o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Default.xml new file mode 100644 index 00000000..e3d76dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Default.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/Baselines/StructDeclarationTest.BitfieldTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Latest.cs new file mode 100644 index 00000000..28d96f58 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Latest.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 o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Latest.xml new file mode 100644 index 00000000..e3d76dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Latest.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/Baselines/StructDeclarationTest.BitfieldTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Preview.cs new file mode 100644 index 00000000..28d96f58 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Preview.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 o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Preview.xml new file mode 100644 index 00000000..e3d76dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldTest.Windows.Preview.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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Compatible.cs new file mode 100644 index 00000000..c6296bfa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Compatible.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("o4_b22_1", offset: 0, length: 1)] + public byte _bitfield3; + + [NativeTypeName("unsigned char : 1")] + public byte o4_b22_1 + { + get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [NativeBitfield("o4_b23_1", offset: 0, length: 1)] + [NativeBitfield("o4_b24_1", offset: 1, length: 1)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Compatible.xml new file mode 100644 index 00000000..383b179a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Compatible.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("o4_b22_1", offset: 0, length: 1) + byte + + + byte + + return (byte)(_bitfield3 & 0x1u); + + + + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + + + + NativeBitfield("o4_b23_1", offset: 0, length: 1) + NativeBitfield("o4_b24_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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Default.cs new file mode 100644 index 00000000..1e3391f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Default.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("o4_b22_1", offset: 0, length: 1)] + public byte _bitfield3; + + [NativeTypeName("unsigned char : 1")] + public byte o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [NativeBitfield("o4_b23_1", offset: 0, length: 1)] + [NativeBitfield("o4_b24_1", offset: 1, length: 1)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Default.xml new file mode 100644 index 00000000..383b179a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Default.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("o4_b22_1", offset: 0, length: 1) + byte + + + byte + + return (byte)(_bitfield3 & 0x1u); + + + + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + + + + NativeBitfield("o4_b23_1", offset: 0, length: 1) + NativeBitfield("o4_b24_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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Latest.cs new file mode 100644 index 00000000..1e3391f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Latest.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("o4_b22_1", offset: 0, length: 1)] + public byte _bitfield3; + + [NativeTypeName("unsigned char : 1")] + public byte o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [NativeBitfield("o4_b23_1", offset: 0, length: 1)] + [NativeBitfield("o4_b24_1", offset: 1, length: 1)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Latest.xml new file mode 100644 index 00000000..383b179a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Latest.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("o4_b22_1", offset: 0, length: 1) + byte + + + byte + + return (byte)(_bitfield3 & 0x1u); + + + + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + + + + NativeBitfield("o4_b23_1", offset: 0, length: 1) + NativeBitfield("o4_b24_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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Preview.cs new file mode 100644 index 00000000..1e3391f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Preview.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("o4_b22_1", offset: 0, length: 1)] + public byte _bitfield3; + + [NativeTypeName("unsigned char : 1")] + public byte o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [NativeBitfield("o4_b23_1", offset: 0, length: 1)] + [NativeBitfield("o4_b24_1", offset: 1, length: 1)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Preview.xml new file mode 100644 index 00000000..383b179a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Unix.Preview.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("o4_b22_1", offset: 0, length: 1) + byte + + + byte + + return (byte)(_bitfield3 & 0x1u); + + + + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + + + + NativeBitfield("o4_b23_1", offset: 0, length: 1) + NativeBitfield("o4_b24_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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Compatible.cs new file mode 100644 index 00000000..c6296bfa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Compatible.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("o4_b22_1", offset: 0, length: 1)] + public byte _bitfield3; + + [NativeTypeName("unsigned char : 1")] + public byte o4_b22_1 + { + get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [NativeBitfield("o4_b23_1", offset: 0, length: 1)] + [NativeBitfield("o4_b24_1", offset: 1, length: 1)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Compatible.xml new file mode 100644 index 00000000..383b179a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Compatible.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("o4_b22_1", offset: 0, length: 1) + byte + + + byte + + return (byte)(_bitfield3 & 0x1u); + + + + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + + + + NativeBitfield("o4_b23_1", offset: 0, length: 1) + NativeBitfield("o4_b24_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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Default.cs new file mode 100644 index 00000000..1e3391f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Default.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("o4_b22_1", offset: 0, length: 1)] + public byte _bitfield3; + + [NativeTypeName("unsigned char : 1")] + public byte o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [NativeBitfield("o4_b23_1", offset: 0, length: 1)] + [NativeBitfield("o4_b24_1", offset: 1, length: 1)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Default.xml new file mode 100644 index 00000000..383b179a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Default.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("o4_b22_1", offset: 0, length: 1) + byte + + + byte + + return (byte)(_bitfield3 & 0x1u); + + + + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + + + + NativeBitfield("o4_b23_1", offset: 0, length: 1) + NativeBitfield("o4_b24_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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Latest.cs new file mode 100644 index 00000000..1e3391f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Latest.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("o4_b22_1", offset: 0, length: 1)] + public byte _bitfield3; + + [NativeTypeName("unsigned char : 1")] + public byte o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [NativeBitfield("o4_b23_1", offset: 0, length: 1)] + [NativeBitfield("o4_b24_1", offset: 1, length: 1)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Latest.xml new file mode 100644 index 00000000..383b179a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Latest.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("o4_b22_1", offset: 0, length: 1) + byte + + + byte + + return (byte)(_bitfield3 & 0x1u); + + + + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + + + + NativeBitfield("o4_b23_1", offset: 0, length: 1) + NativeBitfield("o4_b24_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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Preview.cs new file mode 100644 index 00000000..1e3391f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Preview.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("o4_b22_1", offset: 0, length: 1)] + public byte _bitfield3; + + [NativeTypeName("unsigned char : 1")] + public byte o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [NativeBitfield("o4_b23_1", offset: 0, length: 1)] + [NativeBitfield("o4_b24_1", offset: 1, length: 1)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Preview.xml new file mode 100644 index 00000000..383b179a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.BitfieldWithNativeBitfieldAttributeTest.Windows.Preview.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("o4_b22_1", offset: 0, length: 1) + byte + + + byte + + return (byte)(_bitfield3 & 0x1u); + + + + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + + + + NativeBitfield("o4_b23_1", offset: 0, length: 1) + NativeBitfield("o4_b24_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/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Compatible.cs new file mode 100644 index 00000000..19d8a073 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.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/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Compatible.xml new file mode 100644 index 00000000..dc4426bb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Compatible.xml @@ -0,0 +1,15 @@ + + + + + + IntPtr + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Default.cs new file mode 100644 index 00000000..bf5296e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.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/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Default.xml new file mode 100644 index 00000000..c01c221f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Default.xml @@ -0,0 +1,15 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Latest.cs new file mode 100644 index 00000000..bf5296e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.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/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Latest.xml new file mode 100644 index 00000000..c01c221f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Latest.xml @@ -0,0 +1,15 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Preview.cs new file mode 100644 index 00000000..bf5296e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.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/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Preview.xml new file mode 100644 index 00000000..c01c221f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Unix.Preview.xml @@ -0,0 +1,15 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Compatible.cs new file mode 100644 index 00000000..19d8a073 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.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/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Compatible.xml new file mode 100644 index 00000000..dc4426bb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Compatible.xml @@ -0,0 +1,15 @@ + + + + + + IntPtr + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Default.cs new file mode 100644 index 00000000..bf5296e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.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/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Default.xml new file mode 100644 index 00000000..c01c221f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Default.xml @@ -0,0 +1,15 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Latest.cs new file mode 100644 index 00000000..bf5296e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.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/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Latest.xml new file mode 100644 index 00000000..c01c221f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Latest.xml @@ -0,0 +1,15 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Preview.cs new file mode 100644 index 00000000..bf5296e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.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/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Preview.xml new file mode 100644 index 00000000..c01c221f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.DeclTypeTest.Windows.Preview.xml @@ -0,0 +1,15 @@ + + + + + + delegate* unmanaged[Cdecl]<void> + + + + + void + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Unix.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.ExcludeTest.Windows.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..73670d4f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..8d6c9664 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.cs new file mode 100644 index 00000000..7f0927bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.cs @@ -0,0 +1,65 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.xml new file mode 100644 index 00000000..566392b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Latest.cs new file mode 100644 index 00000000..0cadd4e3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Latest.xml new file mode 100644 index 00000000..edd1a3dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Preview.cs new file mode 100644 index 00000000..0cadd4e3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Preview.xml new file mode 100644 index 00000000..edd1a3dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..73670d4f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..8d6c9664 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.cs new file mode 100644 index 00000000..7f0927bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.cs @@ -0,0 +1,65 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.xml new file mode 100644 index 00000000..566392b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Latest.cs new file mode 100644 index 00000000..0cadd4e3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Latest.xml new file mode 100644 index 00000000..edd1a3dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Preview.cs new file mode 100644 index 00000000..0cadd4e3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Preview.xml new file mode 100644 index 00000000..edd1a3dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..589ea7f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..97260c53 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.cs new file mode 100644 index 00000000..97712e83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.cs @@ -0,0 +1,65 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.xml new file mode 100644 index 00000000..d28c7860 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Latest.cs new file mode 100644 index 00000000..e8ca9097 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Latest.xml new file mode 100644 index 00000000..4ab86ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Preview.cs new file mode 100644 index 00000000..e8ca9097 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Preview.xml new file mode 100644 index 00000000..4ab86ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..589ea7f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..97260c53 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.cs new file mode 100644 index 00000000..97712e83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.cs @@ -0,0 +1,65 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.xml new file mode 100644 index 00000000..d28c7860 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Latest.cs new file mode 100644 index 00000000..e8ca9097 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Latest.xml new file mode 100644 index 00000000..4ab86ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Preview.cs new file mode 100644 index 00000000..e8ca9097 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Preview.xml new file mode 100644 index 00000000..4ab86ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..7b4d3408 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..19707ab0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.cs new file mode 100644 index 00000000..d1ac99bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.cs @@ -0,0 +1,65 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.xml new file mode 100644 index 00000000..e952faab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Latest.cs new file mode 100644 index 00000000..d3a731c1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Latest.xml new file mode 100644 index 00000000..9a97ac1f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Preview.cs new file mode 100644 index 00000000..d3a731c1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Preview.xml new file mode 100644 index 00000000..9a97ac1f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..7b4d3408 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..19707ab0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.cs new file mode 100644 index 00000000..d1ac99bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.cs @@ -0,0 +1,65 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.xml new file mode 100644 index 00000000..e952faab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Latest.cs new file mode 100644 index 00000000..d3a731c1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Latest.xml new file mode 100644 index 00000000..9a97ac1f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Preview.cs new file mode 100644 index 00000000..d3a731c1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Preview.xml new file mode 100644 index 00000000..9a97ac1f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..120dc040 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..a2ec9330 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.cs new file mode 100644 index 00000000..7b1559ec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.cs @@ -0,0 +1,65 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.xml new file mode 100644 index 00000000..c2a1a772 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Latest.cs new file mode 100644 index 00000000..9391a32c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Latest.xml new file mode 100644 index 00000000..49d01557 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Preview.cs new file mode 100644 index 00000000..9391a32c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Preview.xml new file mode 100644 index 00000000..49d01557 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..120dc040 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..a2ec9330 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.cs new file mode 100644 index 00000000..7b1559ec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.cs @@ -0,0 +1,65 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.xml new file mode 100644 index 00000000..c2a1a772 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Latest.cs new file mode 100644 index 00000000..9391a32c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Latest.xml new file mode 100644 index 00000000..49d01557 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Preview.cs new file mode 100644 index 00000000..9391a32c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Preview.xml new file mode 100644 index 00000000..49d01557 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyStruct + + + InlineArray(2 * 1 * 3 * 4) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..0f008d07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..4b11aff9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.cs new file mode 100644 index 00000000..6e720861 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.xml new file mode 100644 index 00000000..67427586 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + double + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Latest.cs new file mode 100644 index 00000000..5bcd4a72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Latest.xml new file mode 100644 index 00000000..3159b1d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Preview.cs new file mode 100644 index 00000000..5bcd4a72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Preview.xml new file mode 100644 index 00000000..3159b1d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..0f008d07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..4b11aff9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.cs new file mode 100644 index 00000000..6e720861 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.xml new file mode 100644 index 00000000..67427586 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + double + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Latest.cs new file mode 100644 index 00000000..5bcd4a72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Latest.xml new file mode 100644 index 00000000..3159b1d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Preview.cs new file mode 100644 index 00000000..5bcd4a72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Preview.xml new file mode 100644 index 00000000..3159b1d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..c39451f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..c5769c37 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.cs new file mode 100644 index 00000000..11d97435 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.xml new file mode 100644 index 00000000..2b3c58a1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + float + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Latest.cs new file mode 100644 index 00000000..081c18c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Latest.xml new file mode 100644 index 00000000..8124d140 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Preview.cs new file mode 100644 index 00000000..081c18c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Preview.xml new file mode 100644 index 00000000..8124d140 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..c39451f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..c5769c37 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.cs new file mode 100644 index 00000000..11d97435 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.xml new file mode 100644 index 00000000..2b3c58a1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + float + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Latest.cs new file mode 100644 index 00000000..081c18c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Latest.xml new file mode 100644 index 00000000..8124d140 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Preview.cs new file mode 100644 index 00000000..081c18c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Preview.xml new file mode 100644 index 00000000..8124d140 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..21094ff5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..f770a976 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.cs new file mode 100644 index 00000000..7cf54025 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.xml new file mode 100644 index 00000000..1e306d3b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + int + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Latest.cs new file mode 100644 index 00000000..409b925b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Latest.xml new file mode 100644 index 00000000..692ca15b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Preview.cs new file mode 100644 index 00000000..409b925b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Preview.xml new file mode 100644 index 00000000..692ca15b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..21094ff5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..f770a976 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.cs new file mode 100644 index 00000000..7cf54025 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.xml new file mode 100644 index 00000000..1e306d3b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + int + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Latest.cs new file mode 100644 index 00000000..409b925b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Latest.xml new file mode 100644 index 00000000..692ca15b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Preview.cs new file mode 100644 index 00000000..409b925b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Preview.xml new file mode 100644 index 00000000..692ca15b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..df6eeb6a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..09962bef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.cs new file mode 100644 index 00000000..a979056b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.xml new file mode 100644 index 00000000..f9460cda --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + short + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Latest.cs new file mode 100644 index 00000000..7d5085c4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Latest.xml new file mode 100644 index 00000000..6379d35b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Preview.cs new file mode 100644 index 00000000..7d5085c4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Preview.xml new file mode 100644 index 00000000..6379d35b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..df6eeb6a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..09962bef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.cs new file mode 100644 index 00000000..a979056b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.xml new file mode 100644 index 00000000..f9460cda --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + short + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Latest.cs new file mode 100644 index 00000000..7d5085c4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Latest.xml new file mode 100644 index 00000000..6379d35b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Preview.cs new file mode 100644 index 00000000..7d5085c4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Preview.xml new file mode 100644 index 00000000..6379d35b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..a7fa733d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..fd4afb4a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.cs new file mode 100644 index 00000000..dea056c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.xml new file mode 100644 index 00000000..152b30bb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + double + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Latest.cs new file mode 100644 index 00000000..d96fc85b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Latest.xml new file mode 100644 index 00000000..4e1ea441 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Preview.cs new file mode 100644 index 00000000..d96fc85b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Preview.xml new file mode 100644 index 00000000..4e1ea441 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..a7fa733d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..fd4afb4a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.cs new file mode 100644 index 00000000..dea056c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.xml new file mode 100644 index 00000000..152b30bb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + double + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Latest.cs new file mode 100644 index 00000000..d96fc85b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Latest.xml new file mode 100644 index 00000000..4e1ea441 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Preview.cs new file mode 100644 index 00000000..d96fc85b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Preview.xml new file mode 100644 index 00000000..4e1ea441 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..ae462848 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..b83794d0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.cs new file mode 100644 index 00000000..49b08b50 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.xml new file mode 100644 index 00000000..929a8a62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + float + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Latest.cs new file mode 100644 index 00000000..1eda77b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Latest.xml new file mode 100644 index 00000000..811f2671 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Preview.cs new file mode 100644 index 00000000..1eda77b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Preview.xml new file mode 100644 index 00000000..811f2671 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..ae462848 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..b83794d0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.cs new file mode 100644 index 00000000..49b08b50 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.xml new file mode 100644 index 00000000..929a8a62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + float + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Latest.cs new file mode 100644 index 00000000..1eda77b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Latest.xml new file mode 100644 index 00000000..811f2671 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Preview.cs new file mode 100644 index 00000000..1eda77b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Preview.xml new file mode 100644 index 00000000..811f2671 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..5bd5e93d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..c7d2723d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.cs new file mode 100644 index 00000000..8d0dbe3a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.xml new file mode 100644 index 00000000..19ee394c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + int + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Latest.cs new file mode 100644 index 00000000..9be4a403 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Latest.xml new file mode 100644 index 00000000..17965210 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Preview.cs new file mode 100644 index 00000000..9be4a403 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Preview.xml new file mode 100644 index 00000000..17965210 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..5bd5e93d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..c7d2723d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.cs new file mode 100644 index 00000000..8d0dbe3a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.xml new file mode 100644 index 00000000..19ee394c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + int + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Latest.cs new file mode 100644 index 00000000..9be4a403 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Latest.xml new file mode 100644 index 00000000..17965210 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Preview.cs new file mode 100644 index 00000000..9be4a403 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Preview.xml new file mode 100644 index 00000000..17965210 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..20a2712b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..b27c3e83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.cs new file mode 100644 index 00000000..68640e44 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.xml new file mode 100644 index 00000000..75b28c16 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + short + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Latest.cs new file mode 100644 index 00000000..5fee19db --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Latest.xml new file mode 100644 index 00000000..67544ecd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Preview.cs new file mode 100644 index 00000000..5fee19db --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Preview.xml new file mode 100644 index 00000000..67544ecd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..20a2712b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..b27c3e83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.cs new file mode 100644 index 00000000..68640e44 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.xml new file mode 100644 index 00000000..75b28c16 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + short + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Latest.cs new file mode 100644 index 00000000..5fee19db --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Latest.xml new file mode 100644 index 00000000..67544ecd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Preview.cs new file mode 100644 index 00000000..5fee19db --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Preview.xml new file mode 100644 index 00000000..67544ecd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Compatible.cs new file mode 100644 index 00000000..44ddef4c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Compatible.xml new file mode 100644 index 00000000..027f45ad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.cs new file mode 100644 index 00000000..67af7f24 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.cs @@ -0,0 +1,34 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.xml new file mode 100644 index 00000000..97c717f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + byte + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Latest.cs new file mode 100644 index 00000000..c06b1082 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Latest.xml new file mode 100644 index 00000000..7331eb63 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Preview.cs new file mode 100644 index 00000000..c06b1082 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Preview.xml new file mode 100644 index 00000000..7331eb63 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Compatible.cs new file mode 100644 index 00000000..44ddef4c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Compatible.xml new file mode 100644 index 00000000..027f45ad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.cs new file mode 100644 index 00000000..67af7f24 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.cs @@ -0,0 +1,34 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.xml new file mode 100644 index 00000000..97c717f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + byte + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Latest.cs new file mode 100644 index 00000000..c06b1082 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Latest.xml new file mode 100644 index 00000000..7331eb63 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Preview.cs new file mode 100644 index 00000000..c06b1082 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Preview.xml new file mode 100644 index 00000000..7331eb63 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..1e27f423 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..8407d72e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.cs new file mode 100644 index 00000000..fc5a267e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.cs @@ -0,0 +1,34 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.xml new file mode 100644 index 00000000..25fea305 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + long + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..09e2cf1a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..0767f489 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + long + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..09e2cf1a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..0767f489 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + long + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..1e27f423 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..8407d72e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.cs new file mode 100644 index 00000000..fc5a267e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.cs @@ -0,0 +1,34 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.xml new file mode 100644 index 00000000..25fea305 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + long + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..09e2cf1a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..0767f489 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + long + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..09e2cf1a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..0767f489 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + long + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..9cc28f6c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..675193db --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..4e4b0cf5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.cs @@ -0,0 +1,34 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..d7183412 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + sbyte + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..0b9c9173 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..4747e6ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + sbyte + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..0b9c9173 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..4747e6ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + sbyte + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..9cc28f6c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..675193db --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..4e4b0cf5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.cs @@ -0,0 +1,34 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..d7183412 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + sbyte + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..0b9c9173 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..4747e6ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + sbyte + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..0b9c9173 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..4747e6ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + sbyte + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..171da97b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..fd409bc5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..09df8584 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.cs @@ -0,0 +1,34 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..dfd3fa29 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + byte + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..8de9bd64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..90368773 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..8de9bd64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..90368773 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..171da97b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..fd409bc5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..09df8584 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.cs @@ -0,0 +1,34 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..dfd3fa29 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + byte + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..8de9bd64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..90368773 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..8de9bd64 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..90368773 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..2e843926 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..65f7549d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..7062eb66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.cs @@ -0,0 +1,34 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..9017c899 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + uint + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..400f71dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..f8047396 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + uint + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..400f71dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..f8047396 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + uint + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..2e843926 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..65f7549d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..7062eb66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.cs @@ -0,0 +1,34 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..9017c899 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + uint + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..400f71dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..f8047396 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + uint + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..400f71dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..f8047396 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + uint + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..48443883 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..bb5aa3f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..a28fe200 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.cs @@ -0,0 +1,34 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..ae89f044 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + ulong + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..16f19b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..e5a69ea6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + ulong + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..16f19b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..e5a69ea6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + ulong + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..48443883 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..bb5aa3f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..a28fe200 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.cs @@ -0,0 +1,34 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..ae89f044 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + ulong + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..16f19b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..e5a69ea6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + ulong + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..16f19b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..e5a69ea6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + ulong + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..f2676a86 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..0710bd40 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..4f758362 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.cs @@ -0,0 +1,34 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..f967bbd8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + ushort + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..cfb5e8a5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..4070a1e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + ushort + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..cfb5e8a5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..4070a1e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + ushort + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..f2676a86 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..0710bd40 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..4f758362 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.cs @@ -0,0 +1,34 @@ +using System; +using System.Runtime.InteropServices; + +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 ref MyStruct this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..f967bbd8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + ushort + + + + + MyStruct + + + + MyStruct + + + MyStruct + + + MyStruct + + + ref MyStruct + + int + + + return ref AsSpan()[index]; + + + + Span<MyStruct> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..cfb5e8a5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..4070a1e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + ushort + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..cfb5e8a5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..4070a1e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + ushort + + + + + MyStruct + + + InlineArray(3) + + MyStruct + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.cs new file mode 100644 index 00000000..e578cfb9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.xml new file mode 100644 index 00000000..3d613894 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.cs new file mode 100644 index 00000000..e578cfb9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.xml new file mode 100644 index 00000000..3d613894 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.cs new file mode 100644 index 00000000..e578cfb9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.xml new file mode 100644 index 00000000..3d613894 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.cs new file mode 100644 index 00000000..e578cfb9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.xml new file mode 100644 index 00000000..3d613894 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.cs new file mode 100644 index 00000000..e578cfb9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.xml new file mode 100644 index 00000000..3d613894 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.cs new file mode 100644 index 00000000..e578cfb9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.xml new file mode 100644 index 00000000..3d613894 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.cs new file mode 100644 index 00000000..e578cfb9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.xml new file mode 100644 index 00000000..3d613894 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.cs new file mode 100644 index 00000000..e578cfb9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.xml new file mode 100644 index 00000000..3d613894 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.cs new file mode 100644 index 00000000..052732da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.xml new file mode 100644 index 00000000..c0facf22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.cs new file mode 100644 index 00000000..052732da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.xml new file mode 100644 index 00000000..c0facf22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.cs new file mode 100644 index 00000000..052732da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.xml new file mode 100644 index 00000000..c0facf22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.cs new file mode 100644 index 00000000..052732da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.xml new file mode 100644 index 00000000..c0facf22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.cs new file mode 100644 index 00000000..052732da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.xml new file mode 100644 index 00000000..c0facf22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.cs new file mode 100644 index 00000000..052732da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.xml new file mode 100644 index 00000000..c0facf22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.cs new file mode 100644 index 00000000..052732da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.xml new file mode 100644 index 00000000..c0facf22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.cs new file mode 100644 index 00000000..052732da --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.xml new file mode 100644 index 00000000..c0facf22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.cs new file mode 100644 index 00000000..ba8ecc61 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.xml new file mode 100644 index 00000000..f53dca6d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.cs new file mode 100644 index 00000000..ba8ecc61 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.xml new file mode 100644 index 00000000..f53dca6d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.cs new file mode 100644 index 00000000..ba8ecc61 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.xml new file mode 100644 index 00000000..f53dca6d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.cs new file mode 100644 index 00000000..ba8ecc61 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.xml new file mode 100644 index 00000000..f53dca6d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.cs new file mode 100644 index 00000000..ba8ecc61 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.xml new file mode 100644 index 00000000..f53dca6d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.cs new file mode 100644 index 00000000..ba8ecc61 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.xml new file mode 100644 index 00000000..f53dca6d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.cs new file mode 100644 index 00000000..ba8ecc61 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.xml new file mode 100644 index 00000000..f53dca6d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.cs new file mode 100644 index 00000000..ba8ecc61 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.xml new file mode 100644 index 00000000..f53dca6d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.cs new file mode 100644 index 00000000..f5b8de8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.xml new file mode 100644 index 00000000..f8ce703e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.cs new file mode 100644 index 00000000..f5b8de8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.xml new file mode 100644 index 00000000..f8ce703e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.cs new file mode 100644 index 00000000..f5b8de8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.xml new file mode 100644 index 00000000..f8ce703e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.cs new file mode 100644 index 00000000..f5b8de8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.xml new file mode 100644 index 00000000..f8ce703e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.cs new file mode 100644 index 00000000..f5b8de8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.xml new file mode 100644 index 00000000..f8ce703e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.cs new file mode 100644 index 00000000..f5b8de8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.xml new file mode 100644 index 00000000..f8ce703e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.cs new file mode 100644 index 00000000..f5b8de8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.xml new file mode 100644 index 00000000..f8ce703e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.cs new file mode 100644 index 00000000..f5b8de8d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.xml new file mode 100644 index 00000000..f8ce703e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..d0555d68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..07b6d238 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.cs new file mode 100644 index 00000000..d0555d68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.xml new file mode 100644 index 00000000..07b6d238 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Latest.cs new file mode 100644 index 00000000..d2bf56aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Latest.xml new file mode 100644 index 00000000..b61dbfd7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(2 * 1 * 3 * 4) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Preview.cs new file mode 100644 index 00000000..d2bf56aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Preview.xml new file mode 100644 index 00000000..b61dbfd7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(2 * 1 * 3 * 4) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..d0555d68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..07b6d238 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.cs new file mode 100644 index 00000000..d0555d68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.xml new file mode 100644 index 00000000..07b6d238 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Latest.cs new file mode 100644 index 00000000..d2bf56aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Latest.xml new file mode 100644 index 00000000..b61dbfd7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(2 * 1 * 3 * 4) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Preview.cs new file mode 100644 index 00000000..d2bf56aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Preview.xml new file mode 100644 index 00000000..b61dbfd7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(2 * 1 * 3 * 4) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..c2beb6a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..f752d135 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.cs new file mode 100644 index 00000000..c2beb6a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.xml new file mode 100644 index 00000000..f752d135 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Latest.cs new file mode 100644 index 00000000..a1359e8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Latest.xml new file mode 100644 index 00000000..530f8eb3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(2 * 1 * 3 * 4) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Preview.cs new file mode 100644 index 00000000..a1359e8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Preview.xml new file mode 100644 index 00000000..530f8eb3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(2 * 1 * 3 * 4) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..c2beb6a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..f752d135 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.cs new file mode 100644 index 00000000..c2beb6a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.xml new file mode 100644 index 00000000..f752d135 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Latest.cs new file mode 100644 index 00000000..a1359e8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Latest.xml new file mode 100644 index 00000000..530f8eb3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(2 * 1 * 3 * 4) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Preview.cs new file mode 100644 index 00000000..a1359e8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Preview.xml new file mode 100644 index 00000000..530f8eb3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(2 * 1 * 3 * 4) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..ab4c3b1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..51f88db5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.cs new file mode 100644 index 00000000..ab4c3b1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.xml new file mode 100644 index 00000000..51f88db5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Latest.cs new file mode 100644 index 00000000..eb441349 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Latest.xml new file mode 100644 index 00000000..a1c08109 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(2 * 1 * 3 * 4) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Preview.cs new file mode 100644 index 00000000..eb441349 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Preview.xml new file mode 100644 index 00000000..a1c08109 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(2 * 1 * 3 * 4) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..ab4c3b1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..51f88db5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.cs new file mode 100644 index 00000000..ab4c3b1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.xml new file mode 100644 index 00000000..51f88db5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Latest.cs new file mode 100644 index 00000000..eb441349 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Latest.xml new file mode 100644 index 00000000..a1c08109 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(2 * 1 * 3 * 4) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Preview.cs new file mode 100644 index 00000000..eb441349 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Preview.xml new file mode 100644 index 00000000..a1c08109 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(2 * 1 * 3 * 4) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..13cc4b44 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..75e900bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.cs new file mode 100644 index 00000000..13cc4b44 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.xml new file mode 100644 index 00000000..75e900bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..991827c4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..438aeb74 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(2 * 1 * 3 * 4) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..991827c4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..438aeb74 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(2 * 1 * 3 * 4) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..13cc4b44 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..75e900bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.cs new file mode 100644 index 00000000..13cc4b44 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.xml new file mode 100644 index 00000000..75e900bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..991827c4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..438aeb74 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(2 * 1 * 3 * 4) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..991827c4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..438aeb74 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(2 * 1 * 3 * 4) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..786eef44 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..049c9f2b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.cs new file mode 100644 index 00000000..786eef44 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.xml new file mode 100644 index 00000000..049c9f2b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Latest.cs new file mode 100644 index 00000000..fe85308d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Latest.xml new file mode 100644 index 00000000..8d3a5fc2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(2 * 1 * 3 * 4) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Preview.cs new file mode 100644 index 00000000..fe85308d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Preview.xml new file mode 100644 index 00000000..8d3a5fc2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(2 * 1 * 3 * 4) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..786eef44 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..049c9f2b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.cs new file mode 100644 index 00000000..786eef44 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.xml new file mode 100644 index 00000000..049c9f2b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Latest.cs new file mode 100644 index 00000000..fe85308d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Latest.xml new file mode 100644 index 00000000..8d3a5fc2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(2 * 1 * 3 * 4) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Preview.cs new file mode 100644 index 00000000..fe85308d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Preview.xml new file mode 100644 index 00000000..8d3a5fc2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(2 * 1 * 3 * 4) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..f63825ad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..70a09b4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..f63825ad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..70a09b4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..7fdb305a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..8bfebe63 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(2 * 1 * 3 * 4) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..7fdb305a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..8bfebe63 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(2 * 1 * 3 * 4) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..f63825ad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..70a09b4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..f63825ad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..70a09b4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..7fdb305a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..8bfebe63 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(2 * 1 * 3 * 4) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..7fdb305a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..8bfebe63 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(2 * 1 * 3 * 4) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..0c8a2e37 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..eae77064 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..0c8a2e37 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..eae77064 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..e49861bc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..9ef24de7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(2 * 1 * 3 * 4) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..e49861bc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..9ef24de7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(2 * 1 * 3 * 4) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..0c8a2e37 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..eae77064 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..0c8a2e37 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..eae77064 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..e49861bc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..9ef24de7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(2 * 1 * 3 * 4) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..e49861bc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..9ef24de7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(2 * 1 * 3 * 4) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..1c700796 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..89dc5c78 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..1c700796 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..89dc5c78 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..ff139657 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..f2de3b72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(2 * 1 * 3 * 4) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..ff139657 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..f2de3b72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(2 * 1 * 3 * 4) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..1c700796 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..89dc5c78 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..1c700796 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..89dc5c78 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..ff139657 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..f2de3b72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(2 * 1 * 3 * 4) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..ff139657 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..f2de3b72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(2 * 1 * 3 * 4) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..7e80a1f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..5c604e8b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..7e80a1f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..5c604e8b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..7a46b36f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..1ef75447 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(2 * 1 * 3 * 4) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..7a46b36f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..1ef75447 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(2 * 1 * 3 * 4) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..7e80a1f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..5c604e8b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..7e80a1f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..5c604e8b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..7a46b36f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..1ef75447 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(2 * 1 * 3 * 4) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..7a46b36f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..1ef75447 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(2 * 1 * 3 * 4) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..41b46fe0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..1357f155 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..41b46fe0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..1357f155 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..a498bd4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..6c292be6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(2 * 1 * 3 * 4) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..a498bd4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..6c292be6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(2 * 1 * 3 * 4) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..41b46fe0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..1357f155 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..41b46fe0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..1357f155 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..a498bd4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..6c292be6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(2 * 1 * 3 * 4) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..a498bd4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..6c292be6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(2 * 1 * 3 * 4) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..9d5d0e23 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..3be23ab1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.cs new file mode 100644 index 00000000..9d5d0e23 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.xml new file mode 100644 index 00000000..3be23ab1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Latest.cs new file mode 100644 index 00000000..7b85681d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Latest.xml new file mode 100644 index 00000000..27ec8458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Preview.cs new file mode 100644 index 00000000..7b85681d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Preview.xml new file mode 100644 index 00000000..27ec8458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..9d5d0e23 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..3be23ab1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.cs new file mode 100644 index 00000000..9d5d0e23 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.xml new file mode 100644 index 00000000..3be23ab1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Latest.cs new file mode 100644 index 00000000..7b85681d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Latest.xml new file mode 100644 index 00000000..27ec8458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Preview.cs new file mode 100644 index 00000000..7b85681d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Preview.xml new file mode 100644 index 00000000..27ec8458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..516ccdc6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..3eb69c35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.cs new file mode 100644 index 00000000..516ccdc6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.xml new file mode 100644 index 00000000..3eb69c35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Latest.cs new file mode 100644 index 00000000..e9f6c5a5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Latest.xml new file mode 100644 index 00000000..18924d1e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Preview.cs new file mode 100644 index 00000000..e9f6c5a5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Preview.xml new file mode 100644 index 00000000..18924d1e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..516ccdc6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..3eb69c35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.cs new file mode 100644 index 00000000..516ccdc6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.xml new file mode 100644 index 00000000..3eb69c35 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Latest.cs new file mode 100644 index 00000000..e9f6c5a5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Latest.xml new file mode 100644 index 00000000..18924d1e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Preview.cs new file mode 100644 index 00000000..e9f6c5a5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Preview.xml new file mode 100644 index 00000000..18924d1e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..d0352b52 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..81d661b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.cs new file mode 100644 index 00000000..d0352b52 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.xml new file mode 100644 index 00000000..81d661b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Latest.cs new file mode 100644 index 00000000..a07aef4e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Latest.xml new file mode 100644 index 00000000..79de9c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Preview.cs new file mode 100644 index 00000000..a07aef4e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Preview.xml new file mode 100644 index 00000000..79de9c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..d0352b52 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..81d661b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.cs new file mode 100644 index 00000000..d0352b52 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.xml new file mode 100644 index 00000000..81d661b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Latest.cs new file mode 100644 index 00000000..a07aef4e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Latest.xml new file mode 100644 index 00000000..79de9c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Preview.cs new file mode 100644 index 00000000..a07aef4e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Preview.xml new file mode 100644 index 00000000..79de9c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..615b82b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..7f002db2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.cs new file mode 100644 index 00000000..615b82b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.xml new file mode 100644 index 00000000..7f002db2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..3b2fdb50 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..5a50ebeb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..3b2fdb50 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..5a50ebeb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..615b82b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..7f002db2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.cs new file mode 100644 index 00000000..615b82b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.xml new file mode 100644 index 00000000..7f002db2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..3b2fdb50 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..5a50ebeb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..3b2fdb50 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..5a50ebeb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..f185967b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..0e397a09 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.cs new file mode 100644 index 00000000..f185967b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.xml new file mode 100644 index 00000000..0e397a09 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Latest.cs new file mode 100644 index 00000000..244f6aee --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Latest.xml new file mode 100644 index 00000000..56287865 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Preview.cs new file mode 100644 index 00000000..244f6aee --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Preview.xml new file mode 100644 index 00000000..56287865 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..f185967b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..0e397a09 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.cs new file mode 100644 index 00000000..f185967b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.xml new file mode 100644 index 00000000..0e397a09 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Latest.cs new file mode 100644 index 00000000..244f6aee --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Latest.xml new file mode 100644 index 00000000..56287865 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Preview.cs new file mode 100644 index 00000000..244f6aee --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Preview.xml new file mode 100644 index 00000000..56287865 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..abb7f652 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..7d17e781 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..abb7f652 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..7d17e781 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..ad59c3e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..ee4c40f1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..ad59c3e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..ee4c40f1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..abb7f652 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..7d17e781 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..abb7f652 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..7d17e781 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..ad59c3e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..ee4c40f1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..ad59c3e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..ee4c40f1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..3b46bfb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..0850a225 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..3b46bfb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..0850a225 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..3d311fa8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..045ff2e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..3d311fa8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..045ff2e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..3b46bfb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..0850a225 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..3b46bfb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..0850a225 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..3d311fa8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..045ff2e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..3d311fa8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..045ff2e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..cd5f73a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..06495e73 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..cd5f73a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..06495e73 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..fbc49772 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..52aaab88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..fbc49772 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..52aaab88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..cd5f73a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..06495e73 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..cd5f73a8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..06495e73 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..fbc49772 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..52aaab88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..fbc49772 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..52aaab88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..53c93ef3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..d3944ad0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..53c93ef3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..d3944ad0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..d5d06922 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..80d63bea --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..d5d06922 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..80d63bea --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..53c93ef3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..d3944ad0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..53c93ef3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..d3944ad0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..d5d06922 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..80d63bea --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..d5d06922 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..80d63bea --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..e4d8376e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..8acd0285 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..e4d8376e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..8acd0285 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..8a7f743a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..154ebd34 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..8a7f743a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..154ebd34 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..e4d8376e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..8acd0285 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..e4d8376e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..8acd0285 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..8a7f743a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..154ebd34 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..8a7f743a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..154ebd34 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..74452b4c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..8c35c8d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.cs new file mode 100644 index 00000000..74452b4c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.xml new file mode 100644 index 00000000..8c35c8d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Latest.cs new file mode 100644 index 00000000..316ad2aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Latest.xml new file mode 100644 index 00000000..b04f25a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Preview.cs new file mode 100644 index 00000000..316ad2aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Preview.xml new file mode 100644 index 00000000..b04f25a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..74452b4c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..8c35c8d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.cs new file mode 100644 index 00000000..74452b4c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.xml new file mode 100644 index 00000000..8c35c8d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Latest.cs new file mode 100644 index 00000000..316ad2aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Latest.xml new file mode 100644 index 00000000..b04f25a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Preview.cs new file mode 100644 index 00000000..316ad2aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Preview.xml new file mode 100644 index 00000000..b04f25a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..e4366884 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..441b3a7f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.cs new file mode 100644 index 00000000..e4366884 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.xml new file mode 100644 index 00000000..441b3a7f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Latest.cs new file mode 100644 index 00000000..5a2f4f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Latest.xml new file mode 100644 index 00000000..5ad6e431 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Preview.cs new file mode 100644 index 00000000..5a2f4f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Preview.xml new file mode 100644 index 00000000..5ad6e431 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..e4366884 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..441b3a7f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.cs new file mode 100644 index 00000000..e4366884 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.xml new file mode 100644 index 00000000..441b3a7f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Latest.cs new file mode 100644 index 00000000..5a2f4f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Latest.xml new file mode 100644 index 00000000..5ad6e431 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Preview.cs new file mode 100644 index 00000000..5a2f4f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Preview.xml new file mode 100644 index 00000000..5ad6e431 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..8da8efec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..be05554b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.cs new file mode 100644 index 00000000..8da8efec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.xml new file mode 100644 index 00000000..be05554b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Latest.cs new file mode 100644 index 00000000..cddcf16e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Latest.xml new file mode 100644 index 00000000..592ded57 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Preview.cs new file mode 100644 index 00000000..cddcf16e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Preview.xml new file mode 100644 index 00000000..592ded57 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..8da8efec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..be05554b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.cs new file mode 100644 index 00000000..8da8efec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.xml new file mode 100644 index 00000000..be05554b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Latest.cs new file mode 100644 index 00000000..cddcf16e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Latest.xml new file mode 100644 index 00000000..592ded57 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Preview.cs new file mode 100644 index 00000000..cddcf16e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Preview.xml new file mode 100644 index 00000000..592ded57 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..02f87a44 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..c821688f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.cs new file mode 100644 index 00000000..02f87a44 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.xml new file mode 100644 index 00000000..c821688f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..d488df79 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..559d2071 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..d488df79 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..559d2071 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..02f87a44 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..c821688f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.cs new file mode 100644 index 00000000..02f87a44 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.xml new file mode 100644 index 00000000..c821688f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..d488df79 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..559d2071 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..d488df79 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..559d2071 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..f2d77797 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..6150c726 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.cs new file mode 100644 index 00000000..f2d77797 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.xml new file mode 100644 index 00000000..6150c726 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Latest.cs new file mode 100644 index 00000000..9e0b9082 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Latest.xml new file mode 100644 index 00000000..9eddaddd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Preview.cs new file mode 100644 index 00000000..9e0b9082 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Preview.xml new file mode 100644 index 00000000..9eddaddd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..f2d77797 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..6150c726 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.cs new file mode 100644 index 00000000..f2d77797 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.xml new file mode 100644 index 00000000..6150c726 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Latest.cs new file mode 100644 index 00000000..9e0b9082 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Latest.xml new file mode 100644 index 00000000..9eddaddd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Preview.cs new file mode 100644 index 00000000..9e0b9082 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Preview.xml new file mode 100644 index 00000000..9eddaddd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..8a5685f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..a056420c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..8a5685f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..a056420c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..501030e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..02e21f41 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..501030e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..02e21f41 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..8a5685f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..a056420c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..8a5685f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..a056420c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..501030e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..02e21f41 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..501030e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..02e21f41 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..72a1e25a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..b4fe51f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..72a1e25a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..b4fe51f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..68b93a7a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..8bc90a1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..68b93a7a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..8bc90a1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..72a1e25a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..b4fe51f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..72a1e25a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..b4fe51f0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..68b93a7a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..8bc90a1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..68b93a7a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..8bc90a1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..6bec107f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..a3291432 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..6bec107f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..a3291432 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..3d75c6d7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..42fb438a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..3d75c6d7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..42fb438a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..6bec107f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..a3291432 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..6bec107f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..a3291432 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..3d75c6d7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..42fb438a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..3d75c6d7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..42fb438a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..5dbcb16d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..23a5295f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..5dbcb16d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..23a5295f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..82779d8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..6353dff0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..82779d8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..6353dff0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..5dbcb16d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..23a5295f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..5dbcb16d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..23a5295f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..82779d8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..6353dff0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..82779d8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..6353dff0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..aba68bc0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..eff33d31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..aba68bc0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..eff33d31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..e837749d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..c75e3da7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..e837749d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..c75e3da7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..aba68bc0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..eff33d31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..aba68bc0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..eff33d31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..e837749d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..c75e3da7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..e837749d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.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/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..c75e3da7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Compatible.cs new file mode 100644 index 00000000..edfc8ade --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Compatible.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/Baselines/StructDeclarationTest.GuidTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Compatible.xml new file mode 100644 index 00000000..3ab1b271 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + int + + + + + int + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Default.cs new file mode 100644 index 00000000..edfc8ade --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Default.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/Baselines/StructDeclarationTest.GuidTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Default.xml new file mode 100644 index 00000000..3ab1b271 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + int + + + + + int + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Latest.cs new file mode 100644 index 00000000..edfc8ade --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Latest.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/Baselines/StructDeclarationTest.GuidTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Latest.xml new file mode 100644 index 00000000..3ab1b271 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + int + + + + + int + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Preview.cs new file mode 100644 index 00000000..edfc8ade --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Preview.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/Baselines/StructDeclarationTest.GuidTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Preview.xml new file mode 100644 index 00000000..3ab1b271 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.GuidTest.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + int + + + + + int + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..a222eef7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..2f140981 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Default.cs new file mode 100644 index 00000000..a222eef7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Default.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Default.xml new file mode 100644 index 00000000..2f140981 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Latest.cs new file mode 100644 index 00000000..30ed1e6f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Latest.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Latest.xml new file mode 100644 index 00000000..1fe6bb16 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Preview.cs new file mode 100644 index 00000000..30ed1e6f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Preview.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.Preview.xml new file mode 100644 index 00000000..1fe6bb16 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Unix.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..a222eef7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..2f140981 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Default.cs new file mode 100644 index 00000000..a222eef7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Default.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Default.xml new file mode 100644 index 00000000..2f140981 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Latest.cs new file mode 100644 index 00000000..30ed1e6f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Latest.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Latest.xml new file mode 100644 index 00000000..1fe6bb16 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Preview.cs new file mode 100644 index 00000000..30ed1e6f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Preview.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.Preview.xml new file mode 100644 index 00000000..1fe6bb16 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.double.Windows.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..5c6ec6a6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..da0f42b5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Default.cs new file mode 100644 index 00000000..5c6ec6a6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Default.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Default.xml new file mode 100644 index 00000000..da0f42b5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Latest.cs new file mode 100644 index 00000000..04c9b255 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Latest.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Latest.xml new file mode 100644 index 00000000..f006108f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Preview.cs new file mode 100644 index 00000000..04c9b255 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Preview.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.Preview.xml new file mode 100644 index 00000000..f006108f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Unix.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..5c6ec6a6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..da0f42b5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Default.cs new file mode 100644 index 00000000..5c6ec6a6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Default.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Default.xml new file mode 100644 index 00000000..da0f42b5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Latest.cs new file mode 100644 index 00000000..04c9b255 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Latest.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Latest.xml new file mode 100644 index 00000000..f006108f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Preview.cs new file mode 100644 index 00000000..04c9b255 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Preview.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.Preview.xml new file mode 100644 index 00000000..f006108f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.float.Windows.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..bfd8b505 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..af5ad1b5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Default.cs new file mode 100644 index 00000000..bfd8b505 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Default.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Default.xml new file mode 100644 index 00000000..af5ad1b5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Latest.cs new file mode 100644 index 00000000..e9f5904d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Latest.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Latest.xml new file mode 100644 index 00000000..fc39d3ce --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Preview.cs new file mode 100644 index 00000000..e9f5904d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Preview.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.Preview.xml new file mode 100644 index 00000000..fc39d3ce --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Unix.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..bfd8b505 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..af5ad1b5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Default.cs new file mode 100644 index 00000000..bfd8b505 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Default.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Default.xml new file mode 100644 index 00000000..af5ad1b5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Latest.cs new file mode 100644 index 00000000..e9f5904d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Latest.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Latest.xml new file mode 100644 index 00000000..fc39d3ce --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Preview.cs new file mode 100644 index 00000000..e9f5904d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Preview.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.Preview.xml new file mode 100644 index 00000000..fc39d3ce --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.int.Windows.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..cabb5ac6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..951de81b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Default.cs new file mode 100644 index 00000000..cabb5ac6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Default.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Default.xml new file mode 100644 index 00000000..951de81b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Latest.cs new file mode 100644 index 00000000..e0b90d99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Latest.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Latest.xml new file mode 100644 index 00000000..6d6c0c42 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Preview.cs new file mode 100644 index 00000000..e0b90d99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Preview.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.Preview.xml new file mode 100644 index 00000000..6d6c0c42 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Unix.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..cabb5ac6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..951de81b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Default.cs new file mode 100644 index 00000000..cabb5ac6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Default.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Default.xml new file mode 100644 index 00000000..951de81b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Latest.cs new file mode 100644 index 00000000..e0b90d99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Latest.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Latest.xml new file mode 100644 index 00000000..6d6c0c42 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Preview.cs new file mode 100644 index 00000000..e0b90d99 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Preview.cs @@ -0,0 +1,29 @@ +using System; +using System.Diagnostics.CodeAnalysis; +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/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.Preview.xml new file mode 100644 index 00000000..6d6c0c42 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.IncompleteArraySizeTest.short.Windows.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/Baselines/StructDeclarationTest.InheritanceTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Compatible.cs new file mode 100644 index 00000000..86711f90 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Compatible.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/Baselines/StructDeclarationTest.InheritanceTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Compatible.xml new file mode 100644 index 00000000..01e2cf9c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Compatible.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Default.cs new file mode 100644 index 00000000..86711f90 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Default.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/Baselines/StructDeclarationTest.InheritanceTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Default.xml new file mode 100644 index 00000000..01e2cf9c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Default.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Latest.cs new file mode 100644 index 00000000..86711f90 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Latest.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/Baselines/StructDeclarationTest.InheritanceTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Latest.xml new file mode 100644 index 00000000..01e2cf9c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Latest.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Preview.cs new file mode 100644 index 00000000..86711f90 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Preview.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/Baselines/StructDeclarationTest.InheritanceTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Preview.xml new file mode 100644 index 00000000..01e2cf9c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Unix.Preview.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Compatible.cs new file mode 100644 index 00000000..86711f90 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Compatible.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/Baselines/StructDeclarationTest.InheritanceTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Compatible.xml new file mode 100644 index 00000000..01e2cf9c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Compatible.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Default.cs new file mode 100644 index 00000000..86711f90 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Default.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/Baselines/StructDeclarationTest.InheritanceTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Default.xml new file mode 100644 index 00000000..01e2cf9c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Default.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Latest.cs new file mode 100644 index 00000000..86711f90 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Latest.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/Baselines/StructDeclarationTest.InheritanceTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Latest.xml new file mode 100644 index 00000000..01e2cf9c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Latest.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Preview.cs new file mode 100644 index 00000000..86711f90 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Preview.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/Baselines/StructDeclarationTest.InheritanceTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Preview.xml new file mode 100644 index 00000000..01e2cf9c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceTest.Windows.Preview.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Compatible.cs new file mode 100644 index 00000000..b0652319 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Compatible.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/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Compatible.xml new file mode 100644 index 00000000..5fae7ad1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Compatible.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Default.cs new file mode 100644 index 00000000..b0652319 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Default.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/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Default.xml new file mode 100644 index 00000000..5fae7ad1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Default.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Latest.cs new file mode 100644 index 00000000..b0652319 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Latest.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/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Latest.xml new file mode 100644 index 00000000..5fae7ad1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Latest.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Preview.cs new file mode 100644 index 00000000..b0652319 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Preview.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/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Preview.xml new file mode 100644 index 00000000..5fae7ad1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Unix.Preview.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Compatible.cs new file mode 100644 index 00000000..b0652319 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Compatible.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/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Compatible.xml new file mode 100644 index 00000000..5fae7ad1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Compatible.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Default.cs new file mode 100644 index 00000000..b0652319 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Default.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/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Default.xml new file mode 100644 index 00000000..5fae7ad1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Default.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Latest.cs new file mode 100644 index 00000000..b0652319 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Latest.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/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Latest.xml new file mode 100644 index 00000000..5fae7ad1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Latest.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Preview.cs new file mode 100644 index 00000000..b0652319 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Preview.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/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Preview.xml new file mode 100644 index 00000000..5fae7ad1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.InheritanceWithNativeInheritanceAttributeTest.Windows.Preview.xml @@ -0,0 +1,35 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + MyStruct1A + + + MyStruct1B + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..0524babb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..4c1c7ce6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Default.cs new file mode 100644 index 00000000..6e7fe3b7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Default.cs @@ -0,0 +1,151 @@ +using System; +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 + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + } + } + + public ref _Anonymous_e__Struct._w_e__Struct w + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + } + } + + public ref double value1 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + } + } + + public ref double value + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + } + } + + public ref double value2 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + } + } + + public ref MyUnion u + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + } + } + + public Span buffer1 + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + } + } + + public Span buffer2 + { + get + { + return Anonymous.buffer2.AsSpan(); + } + } + + 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 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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 4); + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Default.xml new file mode 100644 index 00000000..18c995aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Default.xml @@ -0,0 +1,142 @@ + + + + + + double + + + + + double + + + double + + + _Anonymous_e__Struct + + + ref double + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + + + + ref _Anonymous_e__Struct._w_e__Struct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + + + + ref double + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + + + + ref double + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + + + + ref double + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + + + + ref MyUnion + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + + + + Span<double> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + + + + Span<MyUnion> + + return Anonymous.buffer2.AsSpan(); + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 4); + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Latest.cs new file mode 100644 index 00000000..d51e6cb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Latest.xml new file mode 100644 index 00000000..0a49aae3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Preview.cs new file mode 100644 index 00000000..d51e6cb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.Preview.xml new file mode 100644 index 00000000..0a49aae3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..0524babb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..4c1c7ce6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Default.cs new file mode 100644 index 00000000..6e7fe3b7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Default.cs @@ -0,0 +1,151 @@ +using System; +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 + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + } + } + + public ref _Anonymous_e__Struct._w_e__Struct w + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + } + } + + public ref double value1 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + } + } + + public ref double value + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + } + } + + public ref double value2 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + } + } + + public ref MyUnion u + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + } + } + + public Span buffer1 + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + } + } + + public Span buffer2 + { + get + { + return Anonymous.buffer2.AsSpan(); + } + } + + 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 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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 4); + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Default.xml new file mode 100644 index 00000000..18c995aa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Default.xml @@ -0,0 +1,142 @@ + + + + + + double + + + + + double + + + double + + + _Anonymous_e__Struct + + + ref double + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + + + + ref _Anonymous_e__Struct._w_e__Struct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + + + + ref double + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + + + + ref double + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + + + + ref double + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + + + + ref MyUnion + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + + + + Span<double> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + + + + Span<MyUnion> + + return Anonymous.buffer2.AsSpan(); + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 4); + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Latest.cs new file mode 100644 index 00000000..d51e6cb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Latest.xml new file mode 100644 index 00000000..0a49aae3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Preview.cs new file mode 100644 index 00000000..d51e6cb2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.Preview.xml new file mode 100644 index 00000000..0a49aae3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.double.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..7c929e5b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..6124f5f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Default.cs new file mode 100644 index 00000000..563021c4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Default.cs @@ -0,0 +1,151 @@ +using System; +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 + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + } + } + + public ref _Anonymous_e__Struct._w_e__Struct w + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + } + } + + public ref float value1 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + } + } + + public ref float value + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + } + } + + public ref float value2 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + } + } + + public ref MyUnion u + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + } + } + + public Span buffer1 + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + } + } + + public Span buffer2 + { + get + { + return Anonymous.buffer2.AsSpan(); + } + } + + 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 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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 4); + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Default.xml new file mode 100644 index 00000000..fb6a7f3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Default.xml @@ -0,0 +1,142 @@ + + + + + + float + + + + + float + + + float + + + _Anonymous_e__Struct + + + ref float + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + + + + ref _Anonymous_e__Struct._w_e__Struct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + + + + ref float + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + + + + ref float + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + + + + ref float + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + + + + ref MyUnion + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + + + + Span<float> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + + + + Span<MyUnion> + + return Anonymous.buffer2.AsSpan(); + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 4); + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Latest.cs new file mode 100644 index 00000000..721f7b22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Latest.xml new file mode 100644 index 00000000..b4b5d559 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Preview.cs new file mode 100644 index 00000000..721f7b22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.Preview.xml new file mode 100644 index 00000000..b4b5d559 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..7c929e5b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..6124f5f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Default.cs new file mode 100644 index 00000000..563021c4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Default.cs @@ -0,0 +1,151 @@ +using System; +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 + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + } + } + + public ref _Anonymous_e__Struct._w_e__Struct w + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + } + } + + public ref float value1 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + } + } + + public ref float value + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + } + } + + public ref float value2 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + } + } + + public ref MyUnion u + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + } + } + + public Span buffer1 + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + } + } + + public Span buffer2 + { + get + { + return Anonymous.buffer2.AsSpan(); + } + } + + 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 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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 4); + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Default.xml new file mode 100644 index 00000000..fb6a7f3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Default.xml @@ -0,0 +1,142 @@ + + + + + + float + + + + + float + + + float + + + _Anonymous_e__Struct + + + ref float + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + + + + ref _Anonymous_e__Struct._w_e__Struct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + + + + ref float + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + + + + ref float + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + + + + ref float + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + + + + ref MyUnion + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + + + + Span<float> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + + + + Span<MyUnion> + + return Anonymous.buffer2.AsSpan(); + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 4); + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Latest.cs new file mode 100644 index 00000000..721f7b22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Latest.xml new file mode 100644 index 00000000..b4b5d559 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Preview.cs new file mode 100644 index 00000000..721f7b22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.Preview.xml new file mode 100644 index 00000000..b4b5d559 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.float.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..58f2acf4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..44418cea --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Default.cs new file mode 100644 index 00000000..6bd5833d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Default.cs @@ -0,0 +1,151 @@ +using System; +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 + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + } + } + + public ref _Anonymous_e__Struct._w_e__Struct w + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + } + } + + public ref int value1 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + } + } + + public ref int value + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + } + } + + public ref int value2 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + } + } + + public ref MyUnion u + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + } + } + + public Span buffer1 + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + } + } + + public Span buffer2 + { + get + { + return Anonymous.buffer2.AsSpan(); + } + } + + 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 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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 4); + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Default.xml new file mode 100644 index 00000000..d84fda5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Default.xml @@ -0,0 +1,142 @@ + + + + + + int + + + + + int + + + int + + + _Anonymous_e__Struct + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + + + + ref _Anonymous_e__Struct._w_e__Struct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + + + + ref MyUnion + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + + + + Span<int> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + + + + Span<MyUnion> + + return Anonymous.buffer2.AsSpan(); + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 4); + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Latest.cs new file mode 100644 index 00000000..2f773ed0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Latest.xml new file mode 100644 index 00000000..7a4a63ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Preview.cs new file mode 100644 index 00000000..2f773ed0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.Preview.xml new file mode 100644 index 00000000..7a4a63ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..58f2acf4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..44418cea --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Default.cs new file mode 100644 index 00000000..6bd5833d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Default.cs @@ -0,0 +1,151 @@ +using System; +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 + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + } + } + + public ref _Anonymous_e__Struct._w_e__Struct w + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + } + } + + public ref int value1 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + } + } + + public ref int value + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + } + } + + public ref int value2 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + } + } + + public ref MyUnion u + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + } + } + + public Span buffer1 + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + } + } + + public Span buffer2 + { + get + { + return Anonymous.buffer2.AsSpan(); + } + } + + 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 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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 4); + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Default.xml new file mode 100644 index 00000000..d84fda5c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Default.xml @@ -0,0 +1,142 @@ + + + + + + int + + + + + int + + + int + + + _Anonymous_e__Struct + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + + + + ref _Anonymous_e__Struct._w_e__Struct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + + + + ref MyUnion + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + + + + Span<int> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + + + + Span<MyUnion> + + return Anonymous.buffer2.AsSpan(); + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 4); + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Latest.cs new file mode 100644 index 00000000..2f773ed0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Latest.xml new file mode 100644 index 00000000..7a4a63ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Preview.cs new file mode 100644 index 00000000..2f773ed0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.Preview.xml new file mode 100644 index 00000000..7a4a63ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.int.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..cdae9f20 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..16472978 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Default.cs new file mode 100644 index 00000000..3114672e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Default.cs @@ -0,0 +1,151 @@ +using System; +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 + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + } + } + + public ref _Anonymous_e__Struct._w_e__Struct w + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + } + } + + public ref short value1 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + } + } + + public ref short value + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + } + } + + public ref short value2 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + } + } + + public ref MyUnion u + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + } + } + + public Span buffer1 + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + } + } + + public Span buffer2 + { + get + { + return Anonymous.buffer2.AsSpan(); + } + } + + 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 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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 4); + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Default.xml new file mode 100644 index 00000000..7dd6ae2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Default.xml @@ -0,0 +1,142 @@ + + + + + + short + + + + + short + + + short + + + _Anonymous_e__Struct + + + ref short + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + + + + ref _Anonymous_e__Struct._w_e__Struct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + + + + ref short + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + + + + ref short + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + + + + ref short + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + + + + ref MyUnion + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + + + + Span<short> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + + + + Span<MyUnion> + + return Anonymous.buffer2.AsSpan(); + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 4); + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Latest.cs new file mode 100644 index 00000000..b31e1091 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Latest.xml new file mode 100644 index 00000000..a2e31106 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Preview.cs new file mode 100644 index 00000000..b31e1091 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.Preview.xml new file mode 100644 index 00000000..a2e31106 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Unix.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/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..cdae9f20 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..16472978 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Default.cs new file mode 100644 index 00000000..3114672e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Default.cs @@ -0,0 +1,151 @@ +using System; +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 + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + } + } + + public ref _Anonymous_e__Struct._w_e__Struct w + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + } + } + + public ref short value1 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + } + } + + public ref short value + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + } + } + + public ref short value2 + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + } + } + + public ref MyUnion u + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + } + } + + public Span buffer1 + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + } + } + + public Span buffer2 + { + get + { + return Anonymous.buffer2.AsSpan(); + } + } + + 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 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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 4); + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Default.xml new file mode 100644 index 00000000..7dd6ae2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Default.xml @@ -0,0 +1,142 @@ + + + + + + short + + + + + short + + + short + + + _Anonymous_e__Struct + + + ref short + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + + + + ref _Anonymous_e__Struct._w_e__Struct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); + + + + ref short + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); + + + + ref short + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); + + + + ref short + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); + + + + ref MyUnion + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); + + + + Span<short> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); + + + + Span<MyUnion> + + return Anonymous.buffer2.AsSpan(); + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 4); + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Latest.cs new file mode 100644 index 00000000..b31e1091 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Latest.xml new file mode 100644 index 00000000..a2e31106 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Preview.cs new file mode 100644 index 00000000..b31e1091 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.Preview.xml new file mode 100644 index 00000000..a2e31106 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousTest.short.Windows.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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Compatible.cs new file mode 100644 index 00000000..027027f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.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._Anonymous_e__Struct* pField = &Anonymous.Anonymous) + { + return ref pField->w; + } + } + } + + public int o0_b0_16 + { + get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + public unsafe partial struct _Anonymous_e__Struct + { + public int z; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Struct Anonymous; + + public partial struct _Anonymous_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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Compatible.xml new file mode 100644 index 00000000..372cab2f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.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._Anonymous_e__Struct* pField = &Anonymous.Anonymous) + { + return ref pField->w; + } + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.cs new file mode 100644 index 00000000..365c78d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.cs @@ -0,0 +1,99 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public int x; + + public int y; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L6_C5")] + public _Anonymous_e__Struct Anonymous; + + public ref int z + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + } + } + + public ref int w + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); + } + } + + public int o0_b0_16 + { + readonly get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + readonly get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + public partial struct _Anonymous_e__Struct + { + public int z; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Struct Anonymous; + + public partial struct _Anonymous_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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.xml new file mode 100644 index 00000000..0f8fdc55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.xml @@ -0,0 +1,82 @@ + + + + + + int + + + int + + + _Anonymous_e__Struct + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Latest.cs new file mode 100644 index 00000000..844ff933 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.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.Anonymous.w; + } + } + + public int o0_b0_16 + { + readonly get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + readonly get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + public partial struct _Anonymous_e__Struct + { + public int z; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Struct Anonymous; + + public partial struct _Anonymous_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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Latest.xml new file mode 100644 index 00000000..35759a3e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Latest.xml @@ -0,0 +1,82 @@ + + + + + + int + + + int + + + _Anonymous_e__Struct + + + ref int + + return ref Anonymous.z; + + + + ref int + + return ref Anonymous.Anonymous.w; + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Preview.cs new file mode 100644 index 00000000..844ff933 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.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.Anonymous.w; + } + } + + public int o0_b0_16 + { + readonly get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + readonly get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + public partial struct _Anonymous_e__Struct + { + public int z; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Struct Anonymous; + + public partial struct _Anonymous_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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Preview.xml new file mode 100644 index 00000000..35759a3e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Preview.xml @@ -0,0 +1,82 @@ + + + + + + int + + + int + + + _Anonymous_e__Struct + + + ref int + + return ref Anonymous.z; + + + + ref int + + return ref Anonymous.Anonymous.w; + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Compatible.cs new file mode 100644 index 00000000..027027f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.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._Anonymous_e__Struct* pField = &Anonymous.Anonymous) + { + return ref pField->w; + } + } + } + + public int o0_b0_16 + { + get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + public unsafe partial struct _Anonymous_e__Struct + { + public int z; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Struct Anonymous; + + public partial struct _Anonymous_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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Compatible.xml new file mode 100644 index 00000000..372cab2f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.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._Anonymous_e__Struct* pField = &Anonymous.Anonymous) + { + return ref pField->w; + } + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.cs new file mode 100644 index 00000000..365c78d8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.cs @@ -0,0 +1,99 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public int x; + + public int y; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L6_C5")] + public _Anonymous_e__Struct Anonymous; + + public ref int z + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + } + } + + public ref int w + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); + } + } + + public int o0_b0_16 + { + readonly get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + readonly get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + public partial struct _Anonymous_e__Struct + { + public int z; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Struct Anonymous; + + public partial struct _Anonymous_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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.xml new file mode 100644 index 00000000..0f8fdc55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.xml @@ -0,0 +1,82 @@ + + + + + + int + + + int + + + _Anonymous_e__Struct + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Latest.cs new file mode 100644 index 00000000..844ff933 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.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.Anonymous.w; + } + } + + public int o0_b0_16 + { + readonly get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + readonly get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + public partial struct _Anonymous_e__Struct + { + public int z; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Struct Anonymous; + + public partial struct _Anonymous_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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Latest.xml new file mode 100644 index 00000000..35759a3e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Latest.xml @@ -0,0 +1,82 @@ + + + + + + int + + + int + + + _Anonymous_e__Struct + + + ref int + + return ref Anonymous.z; + + + + ref int + + return ref Anonymous.Anonymous.w; + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Preview.cs new file mode 100644 index 00000000..844ff933 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.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.Anonymous.w; + } + } + + public int o0_b0_16 + { + readonly get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + readonly get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + public partial struct _Anonymous_e__Struct + { + public int z; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Struct Anonymous; + + public partial struct _Anonymous_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/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Preview.xml new file mode 100644 index 00000000..35759a3e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Preview.xml @@ -0,0 +1,82 @@ + + + + + + int + + + int + + + _Anonymous_e__Struct + + + ref int + + return ref Anonymous.z; + + + + ref int + + return ref Anonymous.Anonymous.w; + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_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/Baselines/StructDeclarationTest.NestedTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..0cb50df0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Compatible.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/Baselines/StructDeclarationTest.NestedTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..8672ce0a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Default.cs new file mode 100644 index 00000000..0cb50df0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Default.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/Baselines/StructDeclarationTest.NestedTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Default.xml new file mode 100644 index 00000000..8672ce0a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Latest.cs new file mode 100644 index 00000000..0cb50df0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Latest.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/Baselines/StructDeclarationTest.NestedTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Latest.xml new file mode 100644 index 00000000..8672ce0a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Preview.cs new file mode 100644 index 00000000..0cb50df0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Preview.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/Baselines/StructDeclarationTest.NestedTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Preview.xml new file mode 100644 index 00000000..8672ce0a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..0cb50df0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Compatible.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/Baselines/StructDeclarationTest.NestedTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..8672ce0a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Default.cs new file mode 100644 index 00000000..0cb50df0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Default.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/Baselines/StructDeclarationTest.NestedTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Default.xml new file mode 100644 index 00000000..8672ce0a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Latest.cs new file mode 100644 index 00000000..0cb50df0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Latest.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/Baselines/StructDeclarationTest.NestedTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Latest.xml new file mode 100644 index 00000000..8672ce0a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Preview.cs new file mode 100644 index 00000000..0cb50df0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Preview.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/Baselines/StructDeclarationTest.NestedTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Preview.xml new file mode 100644 index 00000000..8672ce0a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.double.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..0f24586d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Compatible.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/Baselines/StructDeclarationTest.NestedTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..b7251916 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Default.cs new file mode 100644 index 00000000..0f24586d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Default.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/Baselines/StructDeclarationTest.NestedTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Default.xml new file mode 100644 index 00000000..b7251916 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Latest.cs new file mode 100644 index 00000000..0f24586d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Latest.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/Baselines/StructDeclarationTest.NestedTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Latest.xml new file mode 100644 index 00000000..b7251916 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Preview.cs new file mode 100644 index 00000000..0f24586d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Preview.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/Baselines/StructDeclarationTest.NestedTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Preview.xml new file mode 100644 index 00000000..b7251916 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..0f24586d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Compatible.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/Baselines/StructDeclarationTest.NestedTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..b7251916 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Default.cs new file mode 100644 index 00000000..0f24586d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Default.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/Baselines/StructDeclarationTest.NestedTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Default.xml new file mode 100644 index 00000000..b7251916 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Latest.cs new file mode 100644 index 00000000..0f24586d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Latest.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/Baselines/StructDeclarationTest.NestedTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Latest.xml new file mode 100644 index 00000000..b7251916 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Preview.cs new file mode 100644 index 00000000..0f24586d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Preview.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/Baselines/StructDeclarationTest.NestedTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Preview.xml new file mode 100644 index 00000000..b7251916 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.float.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..c0723de1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Compatible.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/Baselines/StructDeclarationTest.NestedTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..a93f89d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Default.cs new file mode 100644 index 00000000..c0723de1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Default.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/Baselines/StructDeclarationTest.NestedTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Default.xml new file mode 100644 index 00000000..a93f89d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Latest.cs new file mode 100644 index 00000000..c0723de1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Latest.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/Baselines/StructDeclarationTest.NestedTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Latest.xml new file mode 100644 index 00000000..a93f89d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Preview.cs new file mode 100644 index 00000000..c0723de1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Preview.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/Baselines/StructDeclarationTest.NestedTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Preview.xml new file mode 100644 index 00000000..a93f89d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..c0723de1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Compatible.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/Baselines/StructDeclarationTest.NestedTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..a93f89d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Default.cs new file mode 100644 index 00000000..c0723de1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Default.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/Baselines/StructDeclarationTest.NestedTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Default.xml new file mode 100644 index 00000000..a93f89d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Latest.cs new file mode 100644 index 00000000..c0723de1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Latest.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/Baselines/StructDeclarationTest.NestedTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Latest.xml new file mode 100644 index 00000000..a93f89d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Preview.cs new file mode 100644 index 00000000..c0723de1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Preview.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/Baselines/StructDeclarationTest.NestedTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Preview.xml new file mode 100644 index 00000000..a93f89d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.int.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..00a0b246 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Compatible.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/Baselines/StructDeclarationTest.NestedTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..79228db5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Default.cs new file mode 100644 index 00000000..00a0b246 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Default.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/Baselines/StructDeclarationTest.NestedTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Default.xml new file mode 100644 index 00000000..79228db5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Latest.cs new file mode 100644 index 00000000..00a0b246 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Latest.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/Baselines/StructDeclarationTest.NestedTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Latest.xml new file mode 100644 index 00000000..79228db5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Preview.cs new file mode 100644 index 00000000..00a0b246 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Preview.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/Baselines/StructDeclarationTest.NestedTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Preview.xml new file mode 100644 index 00000000..79228db5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..00a0b246 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Compatible.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/Baselines/StructDeclarationTest.NestedTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..79228db5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Default.cs new file mode 100644 index 00000000..00a0b246 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Default.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/Baselines/StructDeclarationTest.NestedTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Default.xml new file mode 100644 index 00000000..79228db5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Latest.cs new file mode 100644 index 00000000..00a0b246 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Latest.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/Baselines/StructDeclarationTest.NestedTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Latest.xml new file mode 100644 index 00000000..79228db5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Preview.cs new file mode 100644 index 00000000..00a0b246 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Preview.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/Baselines/StructDeclarationTest.NestedTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Preview.xml new file mode 100644 index 00000000..79228db5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedTest.short.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.cs new file mode 100644 index 00000000..f2ef4c84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.xml new file mode 100644 index 00000000..6a9f2e89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.cs new file mode 100644 index 00000000..f2ef4c84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.xml new file mode 100644 index 00000000..6a9f2e89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.cs new file mode 100644 index 00000000..f2ef4c84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.xml new file mode 100644 index 00000000..6a9f2e89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.cs new file mode 100644 index 00000000..f2ef4c84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.xml new file mode 100644 index 00000000..6a9f2e89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.cs new file mode 100644 index 00000000..f2ef4c84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.xml new file mode 100644 index 00000000..6a9f2e89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.cs new file mode 100644 index 00000000..f2ef4c84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.xml new file mode 100644 index 00000000..6a9f2e89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.cs new file mode 100644 index 00000000..f2ef4c84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.xml new file mode 100644 index 00000000..6a9f2e89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.cs new file mode 100644 index 00000000..f2ef4c84 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.xml new file mode 100644 index 00000000..6a9f2e89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..aeed502a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..8e5592f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.cs new file mode 100644 index 00000000..aeed502a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.xml new file mode 100644 index 00000000..8e5592f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..aeed502a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..8e5592f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..aeed502a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..8e5592f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..aeed502a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..8e5592f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.cs new file mode 100644 index 00000000..aeed502a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.xml new file mode 100644 index 00000000..8e5592f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..aeed502a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..8e5592f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..aeed502a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..8e5592f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..4643558b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..a27f86f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..4643558b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..a27f86f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..4643558b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..a27f86f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..4643558b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..a27f86f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..4643558b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..a27f86f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..4643558b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..a27f86f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..4643558b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..a27f86f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..4643558b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..a27f86f2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..7a1e283b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..62264b8c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..7a1e283b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..62264b8c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..7a1e283b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..62264b8c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..7a1e283b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..62264b8c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..7a1e283b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..62264b8c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..7a1e283b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..62264b8c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..7a1e283b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..62264b8c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..7a1e283b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..62264b8c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..5bad1ccb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..55fbc543 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..5bad1ccb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..55fbc543 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..5bad1ccb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..55fbc543 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..5bad1ccb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..55fbc543 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..5bad1ccb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..55fbc543 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..5bad1ccb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..55fbc543 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..5bad1ccb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..55fbc543 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..5bad1ccb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..55fbc543 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..843e7437 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..65261b85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..843e7437 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..65261b85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..843e7437 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..65261b85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..843e7437 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..65261b85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..843e7437 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..65261b85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..843e7437 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..65261b85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..843e7437 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..65261b85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..843e7437 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..65261b85 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..63d7f1e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..eb513bd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..63d7f1e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..eb513bd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..63d7f1e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..eb513bd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..63d7f1e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..eb513bd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..63d7f1e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..eb513bd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..63d7f1e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..eb513bd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..63d7f1e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..eb513bd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..63d7f1e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.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/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..eb513bd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Compatible.cs new file mode 100644 index 00000000..268fbc52 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Compatible.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/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Compatible.xml new file mode 100644 index 00000000..3ad7bec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Compatible.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Default.cs new file mode 100644 index 00000000..268fbc52 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Default.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/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Default.xml new file mode 100644 index 00000000..3ad7bec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Default.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Latest.cs new file mode 100644 index 00000000..268fbc52 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Latest.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/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Latest.xml new file mode 100644 index 00000000..3ad7bec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Latest.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Preview.cs new file mode 100644 index 00000000..268fbc52 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Preview.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/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Preview.xml new file mode 100644 index 00000000..3ad7bec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Unix.Preview.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Compatible.cs new file mode 100644 index 00000000..268fbc52 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Compatible.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/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Compatible.xml new file mode 100644 index 00000000..3ad7bec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Compatible.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Default.cs new file mode 100644 index 00000000..268fbc52 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Default.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/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Default.xml new file mode 100644 index 00000000..3ad7bec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Default.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Latest.cs new file mode 100644 index 00000000..268fbc52 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Latest.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/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Latest.xml new file mode 100644 index 00000000..3ad7bec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Latest.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Preview.cs new file mode 100644 index 00000000..268fbc52 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Preview.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/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Preview.xml new file mode 100644 index 00000000..3ad7bec1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NewKeywordTest.Windows.Preview.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Compatible.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Compatible.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Compatible.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Compatible.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Default.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Default.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Default.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Default.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Latest.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Latest.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Latest.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Latest.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Preview.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Preview.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Preview.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Unix.Preview.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Compatible.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Compatible.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Compatible.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Compatible.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Default.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Default.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Default.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Default.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Latest.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Latest.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Latest.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Latest.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Preview.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Preview.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Preview.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.NoDefinitionTest.Windows.Preview.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Compatible.cs new file mode 100644 index 00000000..eb72be11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Compatible.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/Baselines/StructDeclarationTest.PackTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Compatible.xml new file mode 100644 index 00000000..5c56d36c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Compatible.xml @@ -0,0 +1,27 @@ + + + + + + uint + + + void* + + + uint + + + + + uint + + + void* + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Default.cs new file mode 100644 index 00000000..eb72be11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Default.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/Baselines/StructDeclarationTest.PackTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Default.xml new file mode 100644 index 00000000..5c56d36c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Default.xml @@ -0,0 +1,27 @@ + + + + + + uint + + + void* + + + uint + + + + + uint + + + void* + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Latest.cs new file mode 100644 index 00000000..eb72be11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Latest.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/Baselines/StructDeclarationTest.PackTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Latest.xml new file mode 100644 index 00000000..5c56d36c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Latest.xml @@ -0,0 +1,27 @@ + + + + + + uint + + + void* + + + uint + + + + + uint + + + void* + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Preview.cs new file mode 100644 index 00000000..eb72be11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Preview.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/Baselines/StructDeclarationTest.PackTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Preview.xml new file mode 100644 index 00000000..5c56d36c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Unix.Preview.xml @@ -0,0 +1,27 @@ + + + + + + uint + + + void* + + + uint + + + + + uint + + + void* + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Compatible.cs new file mode 100644 index 00000000..eb72be11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Compatible.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/Baselines/StructDeclarationTest.PackTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Compatible.xml new file mode 100644 index 00000000..5c56d36c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Compatible.xml @@ -0,0 +1,27 @@ + + + + + + uint + + + void* + + + uint + + + + + uint + + + void* + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Default.cs new file mode 100644 index 00000000..eb72be11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Default.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/Baselines/StructDeclarationTest.PackTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Default.xml new file mode 100644 index 00000000..5c56d36c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Default.xml @@ -0,0 +1,27 @@ + + + + + + uint + + + void* + + + uint + + + + + uint + + + void* + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Latest.cs new file mode 100644 index 00000000..eb72be11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Latest.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/Baselines/StructDeclarationTest.PackTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Latest.xml new file mode 100644 index 00000000..5c56d36c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Latest.xml @@ -0,0 +1,27 @@ + + + + + + uint + + + void* + + + uint + + + + + uint + + + void* + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Preview.cs new file mode 100644 index 00000000..eb72be11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Preview.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/Baselines/StructDeclarationTest.PackTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Preview.xml new file mode 100644 index 00000000..5c56d36c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PackTest.Windows.Preview.xml @@ -0,0 +1,27 @@ + + + + + + uint + + + void* + + + uint + + + + + uint + + + void* + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Compatible.cs new file mode 100644 index 00000000..20c5b911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Compatible.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/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Compatible.xml new file mode 100644 index 00000000..fb82329b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Default.cs new file mode 100644 index 00000000..20c5b911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Default.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/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Default.xml new file mode 100644 index 00000000..fb82329b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Latest.cs new file mode 100644 index 00000000..20c5b911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Latest.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/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Latest.xml new file mode 100644 index 00000000..fb82329b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Preview.cs new file mode 100644 index 00000000..20c5b911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Preview.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/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Preview.xml new file mode 100644 index 00000000..fb82329b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Compatible.cs new file mode 100644 index 00000000..20c5b911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Compatible.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/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Compatible.xml new file mode 100644 index 00000000..fb82329b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Default.cs new file mode 100644 index 00000000..20c5b911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Default.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/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Default.xml new file mode 100644 index 00000000..fb82329b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Latest.cs new file mode 100644 index 00000000..20c5b911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Latest.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/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Latest.xml new file mode 100644 index 00000000..fb82329b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Preview.cs new file mode 100644 index 00000000..20c5b911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Preview.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/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Preview.xml new file mode 100644 index 00000000..fb82329b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfTest.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.cs new file mode 100644 index 00000000..d5808dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.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/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.xml new file mode 100644 index 00000000..383d5ee7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.cs new file mode 100644 index 00000000..d5808dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.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/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.xml new file mode 100644 index 00000000..383d5ee7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.cs new file mode 100644 index 00000000..d5808dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.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/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.xml new file mode 100644 index 00000000..383d5ee7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.cs new file mode 100644 index 00000000..d5808dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.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/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.xml new file mode 100644 index 00000000..383d5ee7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.cs new file mode 100644 index 00000000..d5808dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.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/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.xml new file mode 100644 index 00000000..383d5ee7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.cs new file mode 100644 index 00000000..d5808dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.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/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.xml new file mode 100644 index 00000000..383d5ee7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.cs new file mode 100644 index 00000000..d5808dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.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/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.xml new file mode 100644 index 00000000..383d5ee7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.cs new file mode 100644 index 00000000..d5808dba --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.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/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.xml new file mode 100644 index 00000000..383d5ee7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Compatible.cs new file mode 100644 index 00000000..f96a212d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.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/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Compatible.xml new file mode 100644 index 00000000..17842151 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.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/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Default.cs new file mode 100644 index 00000000..5754a186 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Default.cs @@ -0,0 +1,29 @@ +using System.Runtime.InteropServices; + +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; + + public ref double a + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + } + } + + public partial struct _Anonymous_e__Struct + { + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Default.xml new file mode 100644 index 00000000..c8d64e11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + _Anonymous_e__Struct + + + ref double + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + + + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Latest.cs new file mode 100644 index 00000000..0cae780e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.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/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Latest.xml new file mode 100644 index 00000000..fc65fe70 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.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/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Preview.cs new file mode 100644 index 00000000..0cae780e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.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/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.Preview.xml new file mode 100644 index 00000000..fc65fe70 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Unix.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/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Compatible.cs new file mode 100644 index 00000000..f96a212d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.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/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Compatible.xml new file mode 100644 index 00000000..17842151 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.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/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Default.cs new file mode 100644 index 00000000..5754a186 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Default.cs @@ -0,0 +1,29 @@ +using System.Runtime.InteropServices; + +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; + + public ref double a + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + } + } + + public partial struct _Anonymous_e__Struct + { + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Default.xml new file mode 100644 index 00000000..c8d64e11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + _Anonymous_e__Struct + + + ref double + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + + + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Latest.cs new file mode 100644 index 00000000..0cae780e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.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/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Latest.xml new file mode 100644 index 00000000..fc65fe70 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.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/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Preview.cs new file mode 100644 index 00000000..0cae780e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.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/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.Preview.xml new file mode 100644 index 00000000..fc65fe70 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapNestedAnonymousTest.Windows.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/Baselines/StructDeclarationTest.RemapTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Compatible.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Compatible.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Compatible.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Compatible.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Default.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Default.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Default.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Default.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Latest.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Latest.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Latest.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Latest.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Preview.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Preview.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Preview.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Unix.Preview.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Compatible.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Compatible.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Compatible.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Compatible.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Default.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Default.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Default.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Default.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Latest.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Latest.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Latest.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Latest.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Preview.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Preview.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Preview.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.RemapTest.Windows.Preview.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.cs new file mode 100644 index 00000000..e82ea8f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.cs @@ -0,0 +1,6 @@ +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.xml new file mode 100644 index 00000000..c71e9923 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.cs new file mode 100644 index 00000000..5ae4f8fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.xml new file mode 100644 index 00000000..5077cd83 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.cs new file mode 100644 index 00000000..af54b381 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.xml new file mode 100644 index 00000000..374ff19a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.cs new file mode 100644 index 00000000..30d6c633 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.cs new file mode 100644 index 00000000..eb6aff08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.xml new file mode 100644 index 00000000..bbd27e31 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.cs new file mode 100644 index 00000000..2459a799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.xml new file mode 100644 index 00000000..2efd5005 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..b7fe72ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..510adc82 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..76c52d3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..ef4a07bf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..efea8ec7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..9dbe4132 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..6bced97f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..0e7bdb22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..4b6da458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..e8cfdc96 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..91e4bec0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.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/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..207d533d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Compatible.cs new file mode 100644 index 00000000..00f49ab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Compatible.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/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Compatible.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Default.cs new file mode 100644 index 00000000..00f49ab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Default.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/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Default.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Latest.cs new file mode 100644 index 00000000..00f49ab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Latest.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/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Latest.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Preview.cs new file mode 100644 index 00000000..00f49ab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Preview.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/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Preview.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Compatible.cs new file mode 100644 index 00000000..00f49ab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Compatible.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/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Compatible.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Default.cs new file mode 100644 index 00000000..00f49ab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Default.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/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Default.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Latest.cs new file mode 100644 index 00000000..00f49ab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Latest.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/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Latest.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Preview.cs new file mode 100644 index 00000000..00f49ab9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Preview.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/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Preview.xml new file mode 100644 index 00000000..27257476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.SourceLocationAttributeTest.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Compatible.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Compatible.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Default.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Default.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/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Default.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Latest.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Latest.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/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Latest.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Preview.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Preview.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/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Preview.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Compatible.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Compatible.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Default.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Default.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/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Default.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Latest.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Latest.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/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Latest.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Preview.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Preview.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/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Preview.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.bool.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..2e7f1255 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..b9487771 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Default.cs new file mode 100644 index 00000000..2e7f1255 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Default.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/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Default.xml new file mode 100644 index 00000000..b9487771 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Latest.cs new file mode 100644 index 00000000..2e7f1255 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Latest.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/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Latest.xml new file mode 100644 index 00000000..b9487771 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Preview.cs new file mode 100644 index 00000000..2e7f1255 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Preview.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/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Preview.xml new file mode 100644 index 00000000..b9487771 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..2e7f1255 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..b9487771 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Default.cs new file mode 100644 index 00000000..2e7f1255 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Default.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/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Default.xml new file mode 100644 index 00000000..b9487771 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Latest.cs new file mode 100644 index 00000000..2e7f1255 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Latest.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/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Latest.xml new file mode 100644 index 00000000..b9487771 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Preview.cs new file mode 100644 index 00000000..2e7f1255 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Preview.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/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Preview.xml new file mode 100644 index 00000000..b9487771 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.double.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..ec433d1c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..46893195 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Default.cs new file mode 100644 index 00000000..ec433d1c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Default.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/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Default.xml new file mode 100644 index 00000000..46893195 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Latest.cs new file mode 100644 index 00000000..ec433d1c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Latest.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/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Latest.xml new file mode 100644 index 00000000..46893195 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Preview.cs new file mode 100644 index 00000000..ec433d1c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Preview.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/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Preview.xml new file mode 100644 index 00000000..46893195 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..ec433d1c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..46893195 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Default.cs new file mode 100644 index 00000000..ec433d1c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Default.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/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Default.xml new file mode 100644 index 00000000..46893195 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Latest.cs new file mode 100644 index 00000000..ec433d1c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Latest.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/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Latest.xml new file mode 100644 index 00000000..46893195 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Preview.cs new file mode 100644 index 00000000..ec433d1c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Preview.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/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Preview.xml new file mode 100644 index 00000000..46893195 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.float.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..ce830e39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..00c2a638 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Default.cs new file mode 100644 index 00000000..ce830e39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Default.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/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Default.xml new file mode 100644 index 00000000..00c2a638 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Latest.cs new file mode 100644 index 00000000..ce830e39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Latest.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/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Latest.xml new file mode 100644 index 00000000..00c2a638 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Preview.cs new file mode 100644 index 00000000..ce830e39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Preview.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/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Preview.xml new file mode 100644 index 00000000..00c2a638 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..ce830e39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..00c2a638 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Default.cs new file mode 100644 index 00000000..ce830e39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Default.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/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Default.xml new file mode 100644 index 00000000..00c2a638 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Latest.cs new file mode 100644 index 00000000..ce830e39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Latest.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/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Latest.xml new file mode 100644 index 00000000..00c2a638 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Preview.cs new file mode 100644 index 00000000..ce830e39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Preview.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/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Preview.xml new file mode 100644 index 00000000..00c2a638 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..a1befffe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..059eac1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Default.cs new file mode 100644 index 00000000..a1befffe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Default.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/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Default.xml new file mode 100644 index 00000000..059eac1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..a1befffe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Latest.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/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..059eac1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..a1befffe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Preview.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/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..059eac1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..a1befffe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..059eac1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Default.cs new file mode 100644 index 00000000..a1befffe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Default.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/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Default.xml new file mode 100644 index 00000000..059eac1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..a1befffe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Latest.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/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..059eac1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..a1befffe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Preview.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/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..059eac1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..66d5e77f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..6a9c6061 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Default.cs new file mode 100644 index 00000000..66d5e77f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Default.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/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Default.xml new file mode 100644 index 00000000..6a9c6061 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Latest.cs new file mode 100644 index 00000000..66d5e77f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Latest.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/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Latest.xml new file mode 100644 index 00000000..6a9c6061 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Preview.cs new file mode 100644 index 00000000..66d5e77f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Preview.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/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Preview.xml new file mode 100644 index 00000000..6a9c6061 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..66d5e77f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..6a9c6061 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Default.cs new file mode 100644 index 00000000..66d5e77f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Default.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/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Default.xml new file mode 100644 index 00000000..6a9c6061 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Latest.cs new file mode 100644 index 00000000..66d5e77f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Latest.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/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Latest.xml new file mode 100644 index 00000000..6a9c6061 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Preview.cs new file mode 100644 index 00000000..66d5e77f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Preview.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/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Preview.xml new file mode 100644 index 00000000..6a9c6061 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..0d4c8f49 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..94144e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..0d4c8f49 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Default.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/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..94144e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..0d4c8f49 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Latest.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/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..94144e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..0d4c8f49 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Preview.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/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..94144e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..0d4c8f49 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..94144e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..0d4c8f49 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Default.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/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..94144e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..0d4c8f49 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Latest.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/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..94144e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..0d4c8f49 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Preview.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/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..94144e5d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.signed char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Default.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/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Latest.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/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Preview.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/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Default.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/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Latest.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/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..1b869c55 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Preview.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/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..e1d86744 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..89dce023 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..de4a5ff6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..89dce023 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Default.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/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..de4a5ff6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..89dce023 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Latest.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/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..de4a5ff6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..89dce023 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Preview.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/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..de4a5ff6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..89dce023 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..de4a5ff6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..89dce023 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Default.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/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..de4a5ff6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..89dce023 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Latest.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/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..de4a5ff6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..89dce023 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Preview.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/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..de4a5ff6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..8e49a258 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..eb3265b7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..8e49a258 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Default.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/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..eb3265b7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..8e49a258 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.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/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..eb3265b7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..8e49a258 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.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/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..eb3265b7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..8e49a258 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..eb3265b7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..8e49a258 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Default.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/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..eb3265b7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..8e49a258 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.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/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..eb3265b7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..8e49a258 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.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/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..eb3265b7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..8560828a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..431148e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..8560828a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Default.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/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..431148e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..8560828a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Latest.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/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..431148e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..8560828a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Preview.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/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..431148e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..8560828a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.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/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..431148e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..8560828a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Default.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/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..431148e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..8560828a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Latest.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/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..431148e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..8560828a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Preview.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/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..431148e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.TypedefTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Compatible.cs new file mode 100644 index 00000000..ce35ed67 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Compatible.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/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Compatible.xml new file mode 100644 index 00000000..0b7c19e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + void + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Default.cs new file mode 100644 index 00000000..ce35ed67 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Default.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/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Default.xml new file mode 100644 index 00000000..0b7c19e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + void + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Latest.cs new file mode 100644 index 00000000..ce35ed67 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Latest.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/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Latest.xml new file mode 100644 index 00000000..0b7c19e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + void + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Preview.cs new file mode 100644 index 00000000..ce35ed67 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Preview.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/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Preview.xml new file mode 100644 index 00000000..0b7c19e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + void + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Compatible.cs new file mode 100644 index 00000000..ce35ed67 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Compatible.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/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Compatible.xml new file mode 100644 index 00000000..0b7c19e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + void + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Default.cs new file mode 100644 index 00000000..ce35ed67 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Default.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/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Default.xml new file mode 100644 index 00000000..0b7c19e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + void + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Latest.cs new file mode 100644 index 00000000..ce35ed67 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Latest.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/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Latest.xml new file mode 100644 index 00000000..0b7c19e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + void + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Preview.cs new file mode 100644 index 00000000..ce35ed67 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Preview.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/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Preview.xml new file mode 100644 index 00000000..0b7c19e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.UsingDeclarationTest.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + void + + + + + + void + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Compatible.cs new file mode 100644 index 00000000..009a2ae5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Compatible.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/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Compatible.xml new file mode 100644 index 00000000..81f2baa9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Compatible.xml @@ -0,0 +1,29 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Default.cs new file mode 100644 index 00000000..009a2ae5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Default.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/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Default.xml new file mode 100644 index 00000000..81f2baa9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Default.xml @@ -0,0 +1,29 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Latest.cs new file mode 100644 index 00000000..009a2ae5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Latest.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/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Latest.xml new file mode 100644 index 00000000..81f2baa9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Latest.xml @@ -0,0 +1,29 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Preview.cs new file mode 100644 index 00000000..009a2ae5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Preview.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/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Preview.xml new file mode 100644 index 00000000..81f2baa9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Unix.Preview.xml @@ -0,0 +1,29 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Compatible.cs new file mode 100644 index 00000000..009a2ae5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Compatible.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/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Compatible.xml new file mode 100644 index 00000000..81f2baa9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Compatible.xml @@ -0,0 +1,29 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Default.cs new file mode 100644 index 00000000..009a2ae5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Default.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/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Default.xml new file mode 100644 index 00000000..81f2baa9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Default.xml @@ -0,0 +1,29 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Latest.cs new file mode 100644 index 00000000..009a2ae5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Latest.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/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Latest.xml new file mode 100644 index 00000000..81f2baa9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Latest.xml @@ -0,0 +1,29 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Preview.cs new file mode 100644 index 00000000..009a2ae5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Preview.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/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Preview.xml new file mode 100644 index 00000000..81f2baa9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithAccessSpecifierTest.Windows.Preview.xml @@ -0,0 +1,29 @@ + + + + + + int + + + int + + + + + int + + + int + + + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Compatible.cs new file mode 100644 index 00000000..7356faf9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.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/Baselines/StructDeclarationTest.WithPackingTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Compatible.xml new file mode 100644 index 00000000..9fef18c6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.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/Baselines/StructDeclarationTest.WithPackingTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Default.cs new file mode 100644 index 00000000..cf9a3815 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Default.cs @@ -0,0 +1,28 @@ +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 nuint e0; + public nuint e1; + + public ref nuint this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 2); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Default.xml new file mode 100644 index 00000000..12c49272 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Default.xml @@ -0,0 +1,31 @@ + + + + + + nuint + + + + nuint + + + nuint + + + ref nuint + + int + + + return ref AsSpan()[index]; + + + + Span<nuint> + MemoryMarshal.CreateSpan(ref e0, 2); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Latest.cs new file mode 100644 index 00000000..582d798a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.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/Baselines/StructDeclarationTest.WithPackingTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Latest.xml new file mode 100644 index 00000000..8c8d33b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + nuint + + + InlineArray(2) + + nuint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Preview.cs new file mode 100644 index 00000000..582d798a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.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/Baselines/StructDeclarationTest.WithPackingTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Preview.xml new file mode 100644 index 00000000..8c8d33b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + nuint + + + InlineArray(2) + + nuint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Compatible.cs new file mode 100644 index 00000000..7356faf9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.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/Baselines/StructDeclarationTest.WithPackingTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Compatible.xml new file mode 100644 index 00000000..9fef18c6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.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/Baselines/StructDeclarationTest.WithPackingTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Default.cs new file mode 100644 index 00000000..cf9a3815 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Default.cs @@ -0,0 +1,28 @@ +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 nuint e0; + public nuint e1; + + public ref nuint this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 2); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Default.xml new file mode 100644 index 00000000..12c49272 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Default.xml @@ -0,0 +1,31 @@ + + + + + + nuint + + + + nuint + + + nuint + + + ref nuint + + int + + + return ref AsSpan()[index]; + + + + Span<nuint> + MemoryMarshal.CreateSpan(ref e0, 2); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Latest.cs new file mode 100644 index 00000000..582d798a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.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/Baselines/StructDeclarationTest.WithPackingTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Latest.xml new file mode 100644 index 00000000..8c8d33b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + nuint + + + InlineArray(2) + + nuint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Preview.cs new file mode 100644 index 00000000..582d798a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.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/Baselines/StructDeclarationTest.WithPackingTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Preview.xml new file mode 100644 index 00000000..8c8d33b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/StructDeclarationTest.WithPackingTest.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + nuint + + + InlineArray(2) + + nuint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Compatible.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/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Default.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Default.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/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Default.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Latest.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Latest.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/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Latest.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Preview.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Preview.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/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Preview.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Compatible.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/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Default.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Default.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/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Default.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Latest.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Latest.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/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Latest.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Preview.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Preview.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/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Preview.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.double.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Compatible.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/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Default.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Default.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/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Default.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Latest.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Latest.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/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Latest.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Preview.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Preview.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/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Preview.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Compatible.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/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Default.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Default.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/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Default.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Latest.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Latest.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/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Latest.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Preview.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Preview.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/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Preview.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.float.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Compatible.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/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Default.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Default.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/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Default.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Latest.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Latest.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/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Latest.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Preview.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Preview.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/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Preview.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Compatible.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/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Default.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Default.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/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Default.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Latest.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Latest.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/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Latest.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Preview.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Preview.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/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Preview.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Compatible.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/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Default.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Default.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/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Default.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Latest.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Latest.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/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Latest.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Preview.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Preview.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/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Preview.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Compatible.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/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Default.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Default.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/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Default.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Latest.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Latest.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/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Latest.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Preview.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Preview.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/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Preview.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTest.short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Compatible.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Compatible.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/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Compatible.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Default.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Default.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/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Default.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Latest.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Latest.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/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Latest.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Preview.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Preview.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/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Preview.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Compatible.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Compatible.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/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Compatible.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Default.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Default.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/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Default.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Latest.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Latest.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/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Latest.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Preview.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Preview.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/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Preview.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.double.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Compatible.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Compatible.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/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Compatible.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Default.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Default.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/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Default.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Latest.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Latest.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/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Latest.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Preview.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Preview.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/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Preview.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Compatible.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Compatible.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/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Compatible.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Default.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Default.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/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Default.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Latest.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Latest.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/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Latest.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Preview.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Preview.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/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Preview.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.float.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Compatible.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Compatible.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/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Compatible.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Default.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Default.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/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Default.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Latest.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Latest.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/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Latest.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Preview.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Preview.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/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Preview.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Compatible.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Compatible.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/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Compatible.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Default.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Default.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/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Default.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Latest.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Latest.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/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Latest.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Preview.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Preview.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/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Preview.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Compatible.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Compatible.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/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Compatible.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Default.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Default.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/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Default.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Latest.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Latest.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/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Latest.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Preview.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Preview.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/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Preview.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Compatible.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Compatible.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/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Compatible.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Default.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Default.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/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Default.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Latest.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Latest.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/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Latest.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Preview.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Preview.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/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Preview.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicTestInCMode.short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.bool.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.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/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Compatible.cs new file mode 100644 index 00000000..272a638a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Compatible.cs @@ -0,0 +1,194 @@ +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); + } + } + + [FieldOffset(0)] + public byte _bitfield3; + + [NativeTypeName("unsigned char : 1")] + public byte o4_b22_1 + { + get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [FieldOffset(0)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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)] + 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/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Compatible.xml new file mode 100644 index 00000000..237d9674 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Compatible.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/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Default.cs new file mode 100644 index 00000000..3747e52d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Default.cs @@ -0,0 +1,194 @@ +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); + } + } + + [FieldOffset(0)] + public byte _bitfield3; + + [NativeTypeName("unsigned char : 1")] + public byte o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [FieldOffset(0)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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)] + 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/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Default.xml new file mode 100644 index 00000000..237d9674 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Default.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/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Latest.cs new file mode 100644 index 00000000..3747e52d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Latest.cs @@ -0,0 +1,194 @@ +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); + } + } + + [FieldOffset(0)] + public byte _bitfield3; + + [NativeTypeName("unsigned char : 1")] + public byte o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [FieldOffset(0)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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)] + 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/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Latest.xml new file mode 100644 index 00000000..237d9674 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Latest.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/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Preview.cs new file mode 100644 index 00000000..3747e52d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Preview.cs @@ -0,0 +1,194 @@ +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); + } + } + + [FieldOffset(0)] + public byte _bitfield3; + + [NativeTypeName("unsigned char : 1")] + public byte o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [FieldOffset(0)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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)] + 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/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Preview.xml new file mode 100644 index 00000000..237d9674 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Unix.Preview.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/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Compatible.cs new file mode 100644 index 00000000..a3034d1b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Compatible.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 o4_b22_1 + { + get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [FieldOffset(0)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Compatible.xml new file mode 100644 index 00000000..19c6f45c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Compatible.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/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Default.cs new file mode 100644 index 00000000..93ba6668 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Default.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 o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [FieldOffset(0)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Default.xml new file mode 100644 index 00000000..19c6f45c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Default.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/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Latest.cs new file mode 100644 index 00000000..93ba6668 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Latest.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 o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [FieldOffset(0)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Latest.xml new file mode 100644 index 00000000..19c6f45c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Latest.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/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Preview.cs new file mode 100644 index 00000000..93ba6668 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Preview.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 o4_b22_1 + { + readonly get + { + return (byte)(_bitfield3 & 0x1u); + } + + set + { + _bitfield3 = (byte)((_bitfield3 & ~0x1u) | (value & 0x1u)); + } + } + + [FieldOffset(0)] + public int _bitfield4; + + [NativeTypeName("int : 1")] + public int o4_b23_1 + { + readonly get + { + return (_bitfield4 << 31) >> 31; + } + + set + { + _bitfield4 = (_bitfield4 & ~0x1) | (value & 0x1); + } + } + + [NativeTypeName("int : 1")] + public int o4_b24_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/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Preview.xml new file mode 100644 index 00000000..19c6f45c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.BitfieldTest.Windows.Preview.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/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Unix.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.ExcludeTest.Windows.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..b998b503 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..64ce616d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.cs new file mode 100644 index 00000000..e5728d8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.cs @@ -0,0 +1,69 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.xml new file mode 100644 index 00000000..6495e4cf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Latest.cs new file mode 100644 index 00000000..d6fe3234 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Latest.xml new file mode 100644 index 00000000..8a58cc50 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Preview.cs new file mode 100644 index 00000000..d6fe3234 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Preview.xml new file mode 100644 index 00000000..8a58cc50 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..b998b503 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..64ce616d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.cs new file mode 100644 index 00000000..e5728d8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.cs @@ -0,0 +1,69 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.xml new file mode 100644 index 00000000..6495e4cf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Latest.cs new file mode 100644 index 00000000..d6fe3234 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Latest.xml new file mode 100644 index 00000000..8a58cc50 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Preview.cs new file mode 100644 index 00000000..d6fe3234 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Preview.xml new file mode 100644 index 00000000..8a58cc50 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.double.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..93e49230 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..85cdfa76 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.cs new file mode 100644 index 00000000..08a52c8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.cs @@ -0,0 +1,69 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.xml new file mode 100644 index 00000000..541c6fa9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Latest.cs new file mode 100644 index 00000000..6f2918be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Latest.xml new file mode 100644 index 00000000..e26f8213 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Preview.cs new file mode 100644 index 00000000..6f2918be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Preview.xml new file mode 100644 index 00000000..e26f8213 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..93e49230 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..85cdfa76 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.cs new file mode 100644 index 00000000..08a52c8f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.cs @@ -0,0 +1,69 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.xml new file mode 100644 index 00000000..541c6fa9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Latest.cs new file mode 100644 index 00000000..6f2918be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Latest.xml new file mode 100644 index 00000000..e26f8213 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Preview.cs new file mode 100644 index 00000000..6f2918be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Preview.xml new file mode 100644 index 00000000..e26f8213 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.float.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..62224d3b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..fa814c0a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.cs new file mode 100644 index 00000000..b524b9cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.cs @@ -0,0 +1,69 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.xml new file mode 100644 index 00000000..e0ba02af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Latest.cs new file mode 100644 index 00000000..64795179 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Latest.xml new file mode 100644 index 00000000..9bc4facb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Preview.cs new file mode 100644 index 00000000..64795179 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Preview.xml new file mode 100644 index 00000000..9bc4facb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..62224d3b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..fa814c0a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.cs new file mode 100644 index 00000000..b524b9cd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.cs @@ -0,0 +1,69 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.xml new file mode 100644 index 00000000..e0ba02af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Latest.cs new file mode 100644 index 00000000..64795179 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Latest.xml new file mode 100644 index 00000000..9bc4facb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Preview.cs new file mode 100644 index 00000000..64795179 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Preview.xml new file mode 100644 index 00000000..9bc4facb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.int.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..a62d8c78 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..5db45631 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.cs new file mode 100644 index 00000000..caee106d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.cs @@ -0,0 +1,69 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.xml new file mode 100644 index 00000000..5cecd19c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Latest.cs new file mode 100644 index 00000000..7863deff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Latest.xml new file mode 100644 index 00000000..c14c6f4c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Preview.cs new file mode 100644 index 00000000..7863deff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Preview.xml new file mode 100644 index 00000000..c14c6f4c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..a62d8c78 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..5db45631 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.cs new file mode 100644 index 00000000..caee106d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.cs @@ -0,0 +1,69 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.xml new file mode 100644 index 00000000..5cecd19c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Default.xml @@ -0,0 +1,102 @@ + + + + + + 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 + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Latest.cs new file mode 100644 index 00000000..7863deff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Latest.xml new file mode 100644 index 00000000..c14c6f4c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Preview.cs new file mode 100644 index 00000000..7863deff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Preview.xml new file mode 100644 index 00000000..c14c6f4c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveMultidimensionalTest.short.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyUnion + + + InlineArray(2 * 1 * 3 * 4) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..82ab6e3d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..fe48fb05 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.cs new file mode 100644 index 00000000..4a078964 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.xml new file mode 100644 index 00000000..3a28f8c2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + double + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Latest.cs new file mode 100644 index 00000000..836f3959 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Latest.xml new file mode 100644 index 00000000..f8dc942f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Preview.cs new file mode 100644 index 00000000..836f3959 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Preview.xml new file mode 100644 index 00000000..f8dc942f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..82ab6e3d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..fe48fb05 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.cs new file mode 100644 index 00000000..4a078964 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.xml new file mode 100644 index 00000000..3a28f8c2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + double + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Latest.cs new file mode 100644 index 00000000..836f3959 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Latest.xml new file mode 100644 index 00000000..f8dc942f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Preview.cs new file mode 100644 index 00000000..836f3959 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Preview.xml new file mode 100644 index 00000000..f8dc942f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.double.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..dd1517fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..e2a52cd0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.cs new file mode 100644 index 00000000..cf8119c6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.xml new file mode 100644 index 00000000..60ce2485 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + float + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Latest.cs new file mode 100644 index 00000000..69c7aa91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Latest.xml new file mode 100644 index 00000000..fb472c0c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Preview.cs new file mode 100644 index 00000000..69c7aa91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Preview.xml new file mode 100644 index 00000000..fb472c0c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..dd1517fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..e2a52cd0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.cs new file mode 100644 index 00000000..cf8119c6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.xml new file mode 100644 index 00000000..60ce2485 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + float + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Latest.cs new file mode 100644 index 00000000..69c7aa91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Latest.xml new file mode 100644 index 00000000..fb472c0c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Preview.cs new file mode 100644 index 00000000..69c7aa91 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Preview.xml new file mode 100644 index 00000000..fb472c0c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.float.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..1a9cbcf8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..8d48f7c0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.cs new file mode 100644 index 00000000..0457434e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.xml new file mode 100644 index 00000000..ff43b472 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + int + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Latest.cs new file mode 100644 index 00000000..a122b44e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Latest.xml new file mode 100644 index 00000000..072b466a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Preview.cs new file mode 100644 index 00000000..a122b44e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Preview.xml new file mode 100644 index 00000000..072b466a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..1a9cbcf8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..8d48f7c0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.cs new file mode 100644 index 00000000..0457434e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.xml new file mode 100644 index 00000000..ff43b472 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + int + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Latest.cs new file mode 100644 index 00000000..a122b44e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Latest.xml new file mode 100644 index 00000000..072b466a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Preview.cs new file mode 100644 index 00000000..a122b44e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Preview.xml new file mode 100644 index 00000000..072b466a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.int.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..bbe7f238 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..87d08fea --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.cs new file mode 100644 index 00000000..1d6db7f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.xml new file mode 100644 index 00000000..1b7feade --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + short + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Latest.cs new file mode 100644 index 00000000..c69e2dfa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Latest.xml new file mode 100644 index 00000000..968fcb68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Preview.cs new file mode 100644 index 00000000..c69e2dfa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Preview.xml new file mode 100644 index 00000000..968fcb68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..bbe7f238 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..87d08fea --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.cs new file mode 100644 index 00000000..1d6db7f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.xml new file mode 100644 index 00000000..1b7feade --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + short + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Latest.cs new file mode 100644 index 00000000..c69e2dfa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Latest.xml new file mode 100644 index 00000000..968fcb68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Preview.cs new file mode 100644 index 00000000..c69e2dfa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Preview.xml new file mode 100644 index 00000000..968fcb68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTest.short.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..c0d74687 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..c80ac414 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.cs new file mode 100644 index 00000000..3af99d98 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.xml new file mode 100644 index 00000000..e48eeb29 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + double + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Latest.cs new file mode 100644 index 00000000..3617f76b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Latest.xml new file mode 100644 index 00000000..8444db87 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Preview.cs new file mode 100644 index 00000000..3617f76b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Preview.xml new file mode 100644 index 00000000..8444db87 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..c0d74687 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..c80ac414 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.cs new file mode 100644 index 00000000..3af99d98 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.xml new file mode 100644 index 00000000..e48eeb29 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + double + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Latest.cs new file mode 100644 index 00000000..3617f76b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Latest.xml new file mode 100644 index 00000000..8444db87 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Preview.cs new file mode 100644 index 00000000..3617f76b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Preview.xml new file mode 100644 index 00000000..8444db87 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.double.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + double + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..c5c08814 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..648ad6dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.cs new file mode 100644 index 00000000..beaa25e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.xml new file mode 100644 index 00000000..a3dedafb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + float + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Latest.cs new file mode 100644 index 00000000..06c3db75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Latest.xml new file mode 100644 index 00000000..93760200 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Preview.cs new file mode 100644 index 00000000..06c3db75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Preview.xml new file mode 100644 index 00000000..93760200 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..c5c08814 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..648ad6dc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.cs new file mode 100644 index 00000000..beaa25e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.xml new file mode 100644 index 00000000..a3dedafb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + float + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Latest.cs new file mode 100644 index 00000000..06c3db75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Latest.xml new file mode 100644 index 00000000..93760200 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Preview.cs new file mode 100644 index 00000000..06c3db75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Preview.xml new file mode 100644 index 00000000..93760200 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.float.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + float + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..269a2520 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..a3ce127f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.cs new file mode 100644 index 00000000..a06f6a90 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.xml new file mode 100644 index 00000000..471417f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + int + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Latest.cs new file mode 100644 index 00000000..d265be9a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Latest.xml new file mode 100644 index 00000000..60489cd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Preview.cs new file mode 100644 index 00000000..d265be9a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Preview.xml new file mode 100644 index 00000000..60489cd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..269a2520 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..a3ce127f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.cs new file mode 100644 index 00000000..a06f6a90 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.xml new file mode 100644 index 00000000..471417f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + int + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Latest.cs new file mode 100644 index 00000000..d265be9a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Latest.xml new file mode 100644 index 00000000..60489cd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Preview.cs new file mode 100644 index 00000000..d265be9a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Preview.xml new file mode 100644 index 00000000..60489cd1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.int.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + int + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..6d32f344 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..40590d67 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.cs new file mode 100644 index 00000000..be59c1ac --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.xml new file mode 100644 index 00000000..b190e5cf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + short + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Latest.cs new file mode 100644 index 00000000..1c269675 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Latest.xml new file mode 100644 index 00000000..cea7b477 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Preview.cs new file mode 100644 index 00000000..1c269675 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Preview.xml new file mode 100644 index 00000000..cea7b477 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..6d32f344 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..40590d67 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.cs new file mode 100644 index 00000000..be59c1ac --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.cs @@ -0,0 +1,37 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.xml new file mode 100644 index 00000000..b190e5cf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + short + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Latest.cs new file mode 100644 index 00000000..1c269675 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Latest.xml new file mode 100644 index 00000000..cea7b477 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Preview.cs new file mode 100644 index 00000000..1c269675 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Preview.xml new file mode 100644 index 00000000..cea7b477 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveTypedefTest.short.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + short + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Compatible.cs new file mode 100644 index 00000000..9fb1f78f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Compatible.xml new file mode 100644 index 00000000..9972cc04 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.cs new file mode 100644 index 00000000..3a752232 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.cs @@ -0,0 +1,38 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.xml new file mode 100644 index 00000000..4ad6b51f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + byte + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Latest.cs new file mode 100644 index 00000000..95cd2d43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Latest.xml new file mode 100644 index 00000000..c4b1b035 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Preview.cs new file mode 100644 index 00000000..95cd2d43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Preview.xml new file mode 100644 index 00000000..c4b1b035 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Compatible.cs new file mode 100644 index 00000000..9fb1f78f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Compatible.xml new file mode 100644 index 00000000..9972cc04 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.cs new file mode 100644 index 00000000..3a752232 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.cs @@ -0,0 +1,38 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.xml new file mode 100644 index 00000000..4ad6b51f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + byte + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Latest.cs new file mode 100644 index 00000000..95cd2d43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Latest.xml new file mode 100644 index 00000000..c4b1b035 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Preview.cs new file mode 100644 index 00000000..95cd2d43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Preview.xml new file mode 100644 index 00000000..c4b1b035 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.bool.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..1bef67c6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..83642041 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.cs new file mode 100644 index 00000000..7be6f034 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.cs @@ -0,0 +1,38 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.xml new file mode 100644 index 00000000..3fa6665d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + long + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..5de3a377 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..c73e1bc9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + long + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..5de3a377 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..c73e1bc9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + long + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..1bef67c6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..83642041 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.cs new file mode 100644 index 00000000..7be6f034 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.cs @@ -0,0 +1,38 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.xml new file mode 100644 index 00000000..3fa6665d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + long + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..5de3a377 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..c73e1bc9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + long + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..5de3a377 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..c73e1bc9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.long long.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + long + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..3d0294b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..b1a7c5fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..3b269b19 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.cs @@ -0,0 +1,38 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..6e0296a4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + sbyte + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..9bc3a6d5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..11764a36 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + sbyte + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..9bc3a6d5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..11764a36 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + sbyte + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..3d0294b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..b1a7c5fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..3b269b19 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.cs @@ -0,0 +1,38 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..6e0296a4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + sbyte + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..9bc3a6d5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..11764a36 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + sbyte + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..9bc3a6d5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..11764a36 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.signed char.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + sbyte + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..0cff7d2a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..ba97b200 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..9924501d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.cs @@ -0,0 +1,38 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..7d1f5dca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + byte + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..0607980a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..53df6c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..0607980a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..53df6c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..0cff7d2a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..ba97b200 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..9924501d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.cs @@ -0,0 +1,38 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..7d1f5dca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + byte + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..0607980a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..53df6c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..0607980a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..53df6c08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + byte + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..8911055d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..44af27e3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..4f666961 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.cs @@ -0,0 +1,38 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..7cc7c6b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + uint + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..b0bebdd8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..43d1e56d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + uint + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..b0bebdd8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..43d1e56d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + uint + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..8911055d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..44af27e3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..4f666961 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.cs @@ -0,0 +1,38 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..7cc7c6b9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + uint + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..b0bebdd8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..43d1e56d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + uint + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..b0bebdd8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..43d1e56d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + uint + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..be5270b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..c981d218 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..ed5d2843 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.cs @@ -0,0 +1,38 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..ddb5457b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + ulong + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..1d000776 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..5667b59d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + ulong + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..1d000776 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..5667b59d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + ulong + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..be5270b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..c981d218 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..ed5d2843 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.cs @@ -0,0 +1,38 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..ddb5457b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + ulong + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..1d000776 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..5667b59d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + ulong + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..1d000776 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..5667b59d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + ulong + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..4ab12701 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..e996d13f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..8023e09d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.cs @@ -0,0 +1,38 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..f8231553 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Default.xml @@ -0,0 +1,39 @@ + + + + + + ushort + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..aeed3565 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..82dba2e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,21 @@ + + + + + + ushort + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..aeed3565 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..82dba2e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,21 @@ + + + + + + ushort + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..4ab12701 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..e996d13f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..8023e09d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.cs @@ -0,0 +1,38 @@ +using System; +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 ref MyUnion this[int index] + { + get + { + return ref AsSpan()[index]; + } + } + + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..f8231553 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Default.xml @@ -0,0 +1,39 @@ + + + + + + ushort + + + + + MyUnion + + + + MyUnion + + + MyUnion + + + MyUnion + + + ref MyUnion + + int + + + return ref AsSpan()[index]; + + + + Span<MyUnion> + MemoryMarshal.CreateSpan(ref e0, 3); + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..aeed3565 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..82dba2e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,21 @@ + + + + + + ushort + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..aeed3565 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..82dba2e2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferNonPrimitiveWithNativeTypeNameTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,21 @@ + + + + + + ushort + + + + + MyUnion + + + InlineArray(3) + + MyUnion + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.cs new file mode 100644 index 00000000..a56d836a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.xml new file mode 100644 index 00000000..df40f1b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.cs new file mode 100644 index 00000000..a56d836a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.xml new file mode 100644 index 00000000..df40f1b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.cs new file mode 100644 index 00000000..a56d836a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.xml new file mode 100644 index 00000000..df40f1b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.cs new file mode 100644 index 00000000..a56d836a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.xml new file mode 100644 index 00000000..df40f1b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Unix.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.cs new file mode 100644 index 00000000..a56d836a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.xml new file mode 100644 index 00000000..df40f1b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.cs new file mode 100644 index 00000000..a56d836a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.xml new file mode 100644 index 00000000..df40f1b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.cs new file mode 100644 index 00000000..a56d836a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.xml new file mode 100644 index 00000000..df40f1b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.cs new file mode 100644 index 00000000..a56d836a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.xml new file mode 100644 index 00000000..df40f1b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.double __ast.Windows.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.cs new file mode 100644 index 00000000..324f52e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.xml new file mode 100644 index 00000000..53e7e7ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.cs new file mode 100644 index 00000000..324f52e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.xml new file mode 100644 index 00000000..53e7e7ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.cs new file mode 100644 index 00000000..324f52e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.xml new file mode 100644 index 00000000..53e7e7ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.cs new file mode 100644 index 00000000..324f52e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.xml new file mode 100644 index 00000000..53e7e7ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Unix.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.cs new file mode 100644 index 00000000..324f52e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.xml new file mode 100644 index 00000000..53e7e7ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.cs new file mode 100644 index 00000000..324f52e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.xml new file mode 100644 index 00000000..53e7e7ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.cs new file mode 100644 index 00000000..324f52e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.xml new file mode 100644 index 00000000..53e7e7ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.cs new file mode 100644 index 00000000..324f52e7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.xml new file mode 100644 index 00000000..53e7e7ae --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.float __ast.Windows.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.cs new file mode 100644 index 00000000..37269f66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.xml new file mode 100644 index 00000000..762a02e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.cs new file mode 100644 index 00000000..37269f66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.xml new file mode 100644 index 00000000..762a02e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.cs new file mode 100644 index 00000000..37269f66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.xml new file mode 100644 index 00000000..762a02e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.cs new file mode 100644 index 00000000..37269f66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.xml new file mode 100644 index 00000000..762a02e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Unix.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.cs new file mode 100644 index 00000000..37269f66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.xml new file mode 100644 index 00000000..762a02e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.cs new file mode 100644 index 00000000..37269f66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.xml new file mode 100644 index 00000000..762a02e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.cs new file mode 100644 index 00000000..37269f66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.xml new file mode 100644 index 00000000..762a02e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.cs new file mode 100644 index 00000000..37269f66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.xml new file mode 100644 index 00000000..762a02e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.int __ast.Windows.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.cs new file mode 100644 index 00000000..53291adb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.xml new file mode 100644 index 00000000..464d75e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.cs new file mode 100644 index 00000000..53291adb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.xml new file mode 100644 index 00000000..464d75e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.cs new file mode 100644 index 00000000..53291adb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.xml new file mode 100644 index 00000000..464d75e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.cs new file mode 100644 index 00000000..53291adb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.xml new file mode 100644 index 00000000..464d75e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Unix.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.cs new file mode 100644 index 00000000..53291adb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.xml new file mode 100644 index 00000000..464d75e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Compatible.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.cs new file mode 100644 index 00000000..53291adb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.xml new file mode 100644 index 00000000..464d75e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.cs new file mode 100644 index 00000000..53291adb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.xml new file mode 100644 index 00000000..464d75e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Latest.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.cs new file mode 100644 index 00000000..53291adb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.xml new file mode 100644 index 00000000..464d75e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPointerTest.short __ast.Windows.Preview.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..0d7d49b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..a0e0c938 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.cs new file mode 100644 index 00000000..0d7d49b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.xml new file mode 100644 index 00000000..a0e0c938 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Latest.cs new file mode 100644 index 00000000..807bab88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Latest.xml new file mode 100644 index 00000000..b205f761 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(2 * 1 * 3 * 4) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Preview.cs new file mode 100644 index 00000000..807bab88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Preview.xml new file mode 100644 index 00000000..b205f761 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(2 * 1 * 3 * 4) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..0d7d49b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..a0e0c938 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.cs new file mode 100644 index 00000000..0d7d49b1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.xml new file mode 100644 index 00000000..a0e0c938 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Latest.cs new file mode 100644 index 00000000..807bab88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Latest.xml new file mode 100644 index 00000000..b205f761 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(2 * 1 * 3 * 4) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Preview.cs new file mode 100644 index 00000000..807bab88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Preview.xml new file mode 100644 index 00000000..b205f761 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.double.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(2 * 1 * 3 * 4) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..8708bafd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..dc11d43e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.cs new file mode 100644 index 00000000..8708bafd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.xml new file mode 100644 index 00000000..dc11d43e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Latest.cs new file mode 100644 index 00000000..de835b08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Latest.xml new file mode 100644 index 00000000..0e1809f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(2 * 1 * 3 * 4) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Preview.cs new file mode 100644 index 00000000..de835b08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Preview.xml new file mode 100644 index 00000000..0e1809f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(2 * 1 * 3 * 4) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..8708bafd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..dc11d43e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.cs new file mode 100644 index 00000000..8708bafd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.xml new file mode 100644 index 00000000..dc11d43e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Latest.cs new file mode 100644 index 00000000..de835b08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Latest.xml new file mode 100644 index 00000000..0e1809f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(2 * 1 * 3 * 4) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Preview.cs new file mode 100644 index 00000000..de835b08 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Preview.xml new file mode 100644 index 00000000..0e1809f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.float.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(2 * 1 * 3 * 4) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..c9e34b8c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..e1feb58d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.cs new file mode 100644 index 00000000..c9e34b8c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.xml new file mode 100644 index 00000000..e1feb58d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Latest.cs new file mode 100644 index 00000000..038d5e97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Latest.xml new file mode 100644 index 00000000..ae3fc7b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(2 * 1 * 3 * 4) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Preview.cs new file mode 100644 index 00000000..038d5e97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Preview.xml new file mode 100644 index 00000000..ae3fc7b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(2 * 1 * 3 * 4) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..c9e34b8c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..e1feb58d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.cs new file mode 100644 index 00000000..c9e34b8c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.xml new file mode 100644 index 00000000..e1feb58d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Latest.cs new file mode 100644 index 00000000..038d5e97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Latest.xml new file mode 100644 index 00000000..ae3fc7b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(2 * 1 * 3 * 4) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Preview.cs new file mode 100644 index 00000000..038d5e97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Preview.xml new file mode 100644 index 00000000..ae3fc7b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(2 * 1 * 3 * 4) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..4739b508 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..456177d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.cs new file mode 100644 index 00000000..4739b508 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.xml new file mode 100644 index 00000000..456177d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..7814d878 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..59318b30 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(2 * 1 * 3 * 4) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..7814d878 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..59318b30 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(2 * 1 * 3 * 4) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..4739b508 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..456177d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.cs new file mode 100644 index 00000000..4739b508 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.xml new file mode 100644 index 00000000..456177d6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..7814d878 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..59318b30 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(2 * 1 * 3 * 4) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..7814d878 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..59318b30 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(2 * 1 * 3 * 4) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..32ec48d7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..beb5ebef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.cs new file mode 100644 index 00000000..32ec48d7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.xml new file mode 100644 index 00000000..beb5ebef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Latest.cs new file mode 100644 index 00000000..c2f7333c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Latest.xml new file mode 100644 index 00000000..7705d623 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(2 * 1 * 3 * 4) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Preview.cs new file mode 100644 index 00000000..c2f7333c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Preview.xml new file mode 100644 index 00000000..7705d623 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(2 * 1 * 3 * 4) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..32ec48d7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..beb5ebef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.cs new file mode 100644 index 00000000..32ec48d7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.xml new file mode 100644 index 00000000..beb5ebef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Latest.cs new file mode 100644 index 00000000..c2f7333c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Latest.xml new file mode 100644 index 00000000..7705d623 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(2 * 1 * 3 * 4) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Preview.cs new file mode 100644 index 00000000..c2f7333c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Preview.xml new file mode 100644 index 00000000..7705d623 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(2 * 1 * 3 * 4) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..5c43cb51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..dabb315f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..5c43cb51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..dabb315f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..855f2e71 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..9e2e2458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(2 * 1 * 3 * 4) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..855f2e71 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..9e2e2458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(2 * 1 * 3 * 4) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..5c43cb51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..dabb315f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..5c43cb51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..dabb315f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..855f2e71 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..9e2e2458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(2 * 1 * 3 * 4) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..855f2e71 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..9e2e2458 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.signed char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(2 * 1 * 3 * 4) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..f90641d3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..163e5db4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..f90641d3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..163e5db4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..229e35e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..4755355b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(2 * 1 * 3 * 4) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..229e35e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..4755355b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(2 * 1 * 3 * 4) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..f90641d3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..163e5db4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..f90641d3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..163e5db4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..229e35e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..4755355b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(2 * 1 * 3 * 4) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..229e35e0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..4755355b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(2 * 1 * 3 * 4) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..5fb5ec10 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..c7e1a215 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..5fb5ec10 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..c7e1a215 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..b25a25bd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..b9acf37d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(2 * 1 * 3 * 4) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..b25a25bd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..b9acf37d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(2 * 1 * 3 * 4) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..5fb5ec10 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..c7e1a215 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..5fb5ec10 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..c7e1a215 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..b25a25bd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..b9acf37d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(2 * 1 * 3 * 4) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..b25a25bd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..b9acf37d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(2 * 1 * 3 * 4) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..37fa0e4f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..35611605 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..37fa0e4f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..35611605 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..e0b6e3ef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..6a5918b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(2 * 1 * 3 * 4) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..e0b6e3ef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..6a5918b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(2 * 1 * 3 * 4) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..37fa0e4f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..35611605 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..37fa0e4f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..35611605 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..e0b6e3ef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..6a5918b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(2 * 1 * 3 * 4) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..e0b6e3ef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..6a5918b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(2 * 1 * 3 * 4) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..29789dd7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..ff497a51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..29789dd7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..ff497a51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..38394780 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..107453fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(2 * 1 * 3 * 4) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..38394780 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..107453fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(2 * 1 * 3 * 4) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..29789dd7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..ff497a51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..29789dd7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..ff497a51 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..38394780 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..107453fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(2 * 1 * 3 * 4) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..38394780 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..107453fe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveMultidimensionalTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(2 * 1 * 3 * 4) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..5926dfd5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..88816062 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.cs new file mode 100644 index 00000000..5926dfd5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.xml new file mode 100644 index 00000000..88816062 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Latest.cs new file mode 100644 index 00000000..455d320c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Latest.xml new file mode 100644 index 00000000..d2e3f6c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Preview.cs new file mode 100644 index 00000000..455d320c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Preview.xml new file mode 100644 index 00000000..d2e3f6c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..5926dfd5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..88816062 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.cs new file mode 100644 index 00000000..5926dfd5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.xml new file mode 100644 index 00000000..88816062 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Latest.cs new file mode 100644 index 00000000..455d320c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Latest.xml new file mode 100644 index 00000000..d2e3f6c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Preview.cs new file mode 100644 index 00000000..455d320c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Preview.xml new file mode 100644 index 00000000..d2e3f6c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.double.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..8688dd77 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..627f9026 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.cs new file mode 100644 index 00000000..8688dd77 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.xml new file mode 100644 index 00000000..627f9026 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Latest.cs new file mode 100644 index 00000000..2d8c5fef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Latest.xml new file mode 100644 index 00000000..2bcf6110 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Preview.cs new file mode 100644 index 00000000..2d8c5fef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Preview.xml new file mode 100644 index 00000000..2bcf6110 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..8688dd77 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..627f9026 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.cs new file mode 100644 index 00000000..8688dd77 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.xml new file mode 100644 index 00000000..627f9026 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Latest.cs new file mode 100644 index 00000000..2d8c5fef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Latest.xml new file mode 100644 index 00000000..2bcf6110 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Preview.cs new file mode 100644 index 00000000..2d8c5fef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Preview.xml new file mode 100644 index 00000000..2bcf6110 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.float.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..b0b7f392 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..9f2f1f43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.cs new file mode 100644 index 00000000..b0b7f392 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.xml new file mode 100644 index 00000000..9f2f1f43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Latest.cs new file mode 100644 index 00000000..b5fc1ea5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Latest.xml new file mode 100644 index 00000000..1cfd620d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Preview.cs new file mode 100644 index 00000000..b5fc1ea5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Preview.xml new file mode 100644 index 00000000..1cfd620d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..b0b7f392 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..9f2f1f43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.cs new file mode 100644 index 00000000..b0b7f392 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.xml new file mode 100644 index 00000000..9f2f1f43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Latest.cs new file mode 100644 index 00000000..b5fc1ea5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Latest.xml new file mode 100644 index 00000000..1cfd620d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Preview.cs new file mode 100644 index 00000000..b5fc1ea5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Preview.xml new file mode 100644 index 00000000..1cfd620d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..6a9096be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..ffe2676f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.cs new file mode 100644 index 00000000..6a9096be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.xml new file mode 100644 index 00000000..ffe2676f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..dc877a05 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..7155cb78 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..dc877a05 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..7155cb78 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..6a9096be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..ffe2676f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.cs new file mode 100644 index 00000000..6a9096be --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.xml new file mode 100644 index 00000000..ffe2676f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..dc877a05 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..7155cb78 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..dc877a05 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..7155cb78 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..fb03ac26 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..4e761f75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.cs new file mode 100644 index 00000000..fb03ac26 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.xml new file mode 100644 index 00000000..4e761f75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Latest.cs new file mode 100644 index 00000000..962501a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Latest.xml new file mode 100644 index 00000000..b47cf01b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Preview.cs new file mode 100644 index 00000000..962501a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Preview.xml new file mode 100644 index 00000000..b47cf01b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..fb03ac26 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..4e761f75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.cs new file mode 100644 index 00000000..fb03ac26 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.xml new file mode 100644 index 00000000..4e761f75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Latest.cs new file mode 100644 index 00000000..962501a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Latest.xml new file mode 100644 index 00000000..b47cf01b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Preview.cs new file mode 100644 index 00000000..962501a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Preview.xml new file mode 100644 index 00000000..b47cf01b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..44e18b2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..fbd923f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..44e18b2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..fbd923f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..d25926a4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..8a9b54ad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..d25926a4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..8a9b54ad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..44e18b2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..fbd923f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..44e18b2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..fbd923f9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..d25926a4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..8a9b54ad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..d25926a4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..8a9b54ad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.signed char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..0707a8d0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..f8800a3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..0707a8d0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..f8800a3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..6a189d7d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..7e5e7769 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..6a189d7d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..7e5e7769 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..0707a8d0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..f8800a3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..0707a8d0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..f8800a3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..6a189d7d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..7e5e7769 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..6a189d7d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..7e5e7769 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..20f4e29f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..20f4e22b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..20f4e29f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..20f4e22b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..7976bc29 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..b36aa683 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..7976bc29 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..b36aa683 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..20f4e29f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..20f4e22b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..20f4e29f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..20f4e22b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..7976bc29 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..b36aa683 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..7976bc29 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..b36aa683 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..bdf3bf5b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..90e4a7fd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..bdf3bf5b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..90e4a7fd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..1fbfc59f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..a17189a1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..1fbfc59f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..a17189a1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..bdf3bf5b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..90e4a7fd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..bdf3bf5b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..90e4a7fd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..1fbfc59f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..a17189a1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..1fbfc59f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..a17189a1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..7fdbbdbe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..1876e71a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..7fdbbdbe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..1876e71a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..a3721721 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..c0594172 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..a3721721 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..c0594172 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..7fdbbdbe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..1876e71a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..7fdbbdbe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..1876e71a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..a3721721 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..c0594172 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..a3721721 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..c0594172 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..3ab1db6e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..e515cc0c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.cs new file mode 100644 index 00000000..3ab1db6e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.xml new file mode 100644 index 00000000..e515cc0c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Latest.cs new file mode 100644 index 00000000..feee9af0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Latest.xml new file mode 100644 index 00000000..338b7b2f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Preview.cs new file mode 100644 index 00000000..feee9af0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Preview.xml new file mode 100644 index 00000000..338b7b2f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..3ab1db6e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..e515cc0c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.cs new file mode 100644 index 00000000..3ab1db6e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.xml new file mode 100644 index 00000000..e515cc0c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Latest.cs new file mode 100644 index 00000000..feee9af0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Latest.xml new file mode 100644 index 00000000..338b7b2f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Preview.cs new file mode 100644 index 00000000..feee9af0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Preview.xml new file mode 100644 index 00000000..338b7b2f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.double.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + InlineArray(3) + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..d5b831ec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..0fd4a679 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.cs new file mode 100644 index 00000000..d5b831ec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.xml new file mode 100644 index 00000000..0fd4a679 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Latest.cs new file mode 100644 index 00000000..4f619c97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Latest.xml new file mode 100644 index 00000000..7ebdf2ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Preview.cs new file mode 100644 index 00000000..4f619c97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Preview.xml new file mode 100644 index 00000000..7ebdf2ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..d5b831ec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..0fd4a679 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.cs new file mode 100644 index 00000000..d5b831ec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.xml new file mode 100644 index 00000000..0fd4a679 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Latest.cs new file mode 100644 index 00000000..4f619c97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Latest.xml new file mode 100644 index 00000000..7ebdf2ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Preview.cs new file mode 100644 index 00000000..4f619c97 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Preview.xml new file mode 100644 index 00000000..7ebdf2ca --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.float.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + InlineArray(3) + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..17b8257f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..7ee6ea5e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.cs new file mode 100644 index 00000000..17b8257f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.xml new file mode 100644 index 00000000..7ee6ea5e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Latest.cs new file mode 100644 index 00000000..02e4c8fb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Latest.xml new file mode 100644 index 00000000..61f48ff0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Preview.cs new file mode 100644 index 00000000..02e4c8fb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Preview.xml new file mode 100644 index 00000000..61f48ff0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..17b8257f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..7ee6ea5e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.cs new file mode 100644 index 00000000..17b8257f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.xml new file mode 100644 index 00000000..7ee6ea5e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Latest.cs new file mode 100644 index 00000000..02e4c8fb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Latest.xml new file mode 100644 index 00000000..61f48ff0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Preview.cs new file mode 100644 index 00000000..02e4c8fb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Preview.xml new file mode 100644 index 00000000..61f48ff0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + InlineArray(3) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..3fb3139d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..0ea92202 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.cs new file mode 100644 index 00000000..3fb3139d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.xml new file mode 100644 index 00000000..0ea92202 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..9f9ad14b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..6e49cbc9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..9f9ad14b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..6e49cbc9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..3fb3139d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..0ea92202 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.cs new file mode 100644 index 00000000..3fb3139d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.xml new file mode 100644 index 00000000..0ea92202 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..9f9ad14b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..6e49cbc9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..9f9ad14b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..6e49cbc9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + InlineArray(3) + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..5f0e2376 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..ae71f5b3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.cs new file mode 100644 index 00000000..5f0e2376 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.xml new file mode 100644 index 00000000..ae71f5b3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Latest.cs new file mode 100644 index 00000000..831a86b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Latest.xml new file mode 100644 index 00000000..1b8472a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Preview.cs new file mode 100644 index 00000000..831a86b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Preview.xml new file mode 100644 index 00000000..1b8472a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..5f0e2376 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..ae71f5b3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.cs new file mode 100644 index 00000000..5f0e2376 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.xml new file mode 100644 index 00000000..ae71f5b3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Latest.cs new file mode 100644 index 00000000..831a86b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Latest.xml new file mode 100644 index 00000000..1b8472a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Preview.cs new file mode 100644 index 00000000..831a86b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Preview.xml new file mode 100644 index 00000000..1b8472a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + InlineArray(3) + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..50e84587 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..3c3399c4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..50e84587 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..3c3399c4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..e934e334 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..eb5db7ac --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..e934e334 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..eb5db7ac --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..50e84587 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..3c3399c4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..50e84587 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..3c3399c4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..e934e334 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..eb5db7ac --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..e934e334 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..eb5db7ac --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.signed char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + InlineArray(3) + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..4c5575df --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..023a2c93 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..4c5575df --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..023a2c93 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..a4df4606 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..9ee51743 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..a4df4606 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..9ee51743 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..4c5575df --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..023a2c93 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..4c5575df --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..023a2c93 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..a4df4606 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..9ee51743 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..a4df4606 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..9ee51743 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + InlineArray(3) + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..ca73b84b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..db613152 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..ca73b84b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..db613152 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..db336d1f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..d6c18f54 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..db336d1f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..d6c18f54 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..ca73b84b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..db613152 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..ca73b84b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..db613152 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..db336d1f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..d6c18f54 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..db336d1f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..d6c18f54 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + InlineArray(3) + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..5d928f95 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..1883631a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..5d928f95 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..1883631a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..344c5a3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..cbd1693b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..344c5a3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..cbd1693b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..5d928f95 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..1883631a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..5d928f95 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..1883631a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..344c5a3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..cbd1693b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..344c5a3c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..cbd1693b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + InlineArray(3) + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..8e8aebdf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..00b30e2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..8e8aebdf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..00b30e2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Default.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..5aeb3216 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..a828d668 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..5aeb3216 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..a828d668 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..8e8aebdf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..00b30e2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..8e8aebdf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..00b30e2c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Default.xml @@ -0,0 +1,10 @@ + + + + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..5aeb3216 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..a828d668 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..5aeb3216 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.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/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..a828d668 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.FixedSizedBufferPrimitiveTypedefTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + InlineArray(3) + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Compatible.cs new file mode 100644 index 00000000..be649a74 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Compatible.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/Baselines/UnionDeclarationTest.GuidTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Compatible.xml new file mode 100644 index 00000000..72c17583 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + int + + + + + int + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Default.cs new file mode 100644 index 00000000..be649a74 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Default.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/Baselines/UnionDeclarationTest.GuidTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Default.xml new file mode 100644 index 00000000..72c17583 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + int + + + + + int + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Latest.cs new file mode 100644 index 00000000..be649a74 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Latest.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/Baselines/UnionDeclarationTest.GuidTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Latest.xml new file mode 100644 index 00000000..72c17583 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + int + + + + + int + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Preview.cs new file mode 100644 index 00000000..be649a74 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Preview.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/Baselines/UnionDeclarationTest.GuidTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Preview.xml new file mode 100644 index 00000000..72c17583 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.GuidTest.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + int + + + + + int + + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..5ebb0ab8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..1e672581 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Default.cs new file mode 100644 index 00000000..223e9ace --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Default.cs @@ -0,0 +1,65 @@ +using System; +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 + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + } + } + + public ref MyStruct s + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + } + } + + public Span buffer + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + } + } + + [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/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Default.xml new file mode 100644 index 00000000..575db98a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Default.xml @@ -0,0 +1,53 @@ + + + + + + double + + + + + double + + + double + + + double + + + _Anonymous_e__Union + + + ref double + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + + + + ref MyStruct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + + + + Span<double> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + + + + + double + + + MyStruct + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Latest.cs new file mode 100644 index 00000000..5077a3a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Latest.xml new file mode 100644 index 00000000..8c0b09dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Preview.cs new file mode 100644 index 00000000..5077a3a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.Preview.xml new file mode 100644 index 00000000..8c0b09dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Unix.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..5ebb0ab8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..1e672581 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Default.cs new file mode 100644 index 00000000..223e9ace --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Default.cs @@ -0,0 +1,65 @@ +using System; +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 + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + } + } + + public ref MyStruct s + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + } + } + + public Span buffer + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + } + } + + [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/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Default.xml new file mode 100644 index 00000000..575db98a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Default.xml @@ -0,0 +1,53 @@ + + + + + + double + + + + + double + + + double + + + double + + + _Anonymous_e__Union + + + ref double + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + + + + ref MyStruct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + + + + Span<double> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + + + + + double + + + MyStruct + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Latest.cs new file mode 100644 index 00000000..5077a3a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Latest.xml new file mode 100644 index 00000000..8c0b09dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Preview.cs new file mode 100644 index 00000000..5077a3a7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.Preview.xml new file mode 100644 index 00000000..8c0b09dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.double.Windows.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..04ee0cfe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..9e5635a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Compatible.xml @@ -0,0 +1,62 @@ + + + + + + float + + + + + float + + + float + + + float + + + _Anonymous_e__Union + + + ref float + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->a; + } + + + + ref MyStruct + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->s; + } + + + + ref float + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->buffer[0]; + } + + + + + float + + + MyStruct + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Default.cs new file mode 100644 index 00000000..d1816a58 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Default.cs @@ -0,0 +1,65 @@ +using System; +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 + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + } + } + + public ref MyStruct s + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + } + } + + public Span buffer + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + } + } + + [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/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Default.xml new file mode 100644 index 00000000..4388a1d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Default.xml @@ -0,0 +1,53 @@ + + + + + + float + + + + + float + + + float + + + float + + + _Anonymous_e__Union + + + ref float + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + + + + ref MyStruct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + + + + Span<float> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + + + + + float + + + MyStruct + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Latest.cs new file mode 100644 index 00000000..4d586be0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Latest.xml new file mode 100644 index 00000000..2c20e790 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Latest.xml @@ -0,0 +1,59 @@ + + + + + + float + + + + + float + + + float + + + float + + + _Anonymous_e__Union + + + ref float + + return ref Anonymous.a; + + + + ref MyStruct + + return ref Anonymous.s; + + + + Span<float> + + return Anonymous.buffer; + + + + + float + + + MyStruct + + + float + + + InlineArray(4) + + float + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Preview.cs new file mode 100644 index 00000000..4d586be0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Preview.xml new file mode 100644 index 00000000..2c20e790 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Unix.Preview.xml @@ -0,0 +1,59 @@ + + + + + + float + + + + + float + + + float + + + float + + + _Anonymous_e__Union + + + ref float + + return ref Anonymous.a; + + + + ref MyStruct + + return ref Anonymous.s; + + + + Span<float> + + return Anonymous.buffer; + + + + + float + + + MyStruct + + + float + + + InlineArray(4) + + float + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..04ee0cfe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..9e5635a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Compatible.xml @@ -0,0 +1,62 @@ + + + + + + float + + + + + float + + + float + + + float + + + _Anonymous_e__Union + + + ref float + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->a; + } + + + + ref MyStruct + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->s; + } + + + + ref float + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->buffer[0]; + } + + + + + float + + + MyStruct + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Default.cs new file mode 100644 index 00000000..d1816a58 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Default.cs @@ -0,0 +1,65 @@ +using System; +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 + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + } + } + + public ref MyStruct s + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + } + } + + public Span buffer + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + } + } + + [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/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Default.xml new file mode 100644 index 00000000..4388a1d4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Default.xml @@ -0,0 +1,53 @@ + + + + + + float + + + + + float + + + float + + + float + + + _Anonymous_e__Union + + + ref float + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + + + + ref MyStruct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + + + + Span<float> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + + + + + float + + + MyStruct + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Latest.cs new file mode 100644 index 00000000..4d586be0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Latest.xml new file mode 100644 index 00000000..2c20e790 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Latest.xml @@ -0,0 +1,59 @@ + + + + + + float + + + + + float + + + float + + + float + + + _Anonymous_e__Union + + + ref float + + return ref Anonymous.a; + + + + ref MyStruct + + return ref Anonymous.s; + + + + Span<float> + + return Anonymous.buffer; + + + + + float + + + MyStruct + + + float + + + InlineArray(4) + + float + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Preview.cs new file mode 100644 index 00000000..4d586be0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.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/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Preview.xml new file mode 100644 index 00000000..2c20e790 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.float.Windows.Preview.xml @@ -0,0 +1,59 @@ + + + + + + float + + + + + float + + + float + + + float + + + _Anonymous_e__Union + + + ref float + + return ref Anonymous.a; + + + + ref MyStruct + + return ref Anonymous.s; + + + + Span<float> + + return Anonymous.buffer; + + + + + float + + + MyStruct + + + float + + + InlineArray(4) + + float + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..bd9a11ad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Compatible.cs @@ -0,0 +1,73 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public int value; + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct MyUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + public ref int 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 int 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 int a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("int[4]")] + public fixed int buffer[4]; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..f68e2efb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Compatible.xml @@ -0,0 +1,62 @@ + + + + + + int + + + + + int + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->a; + } + + + + ref MyStruct + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->s; + } + + + + ref int + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->buffer[0]; + } + + + + + int + + + MyStruct + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Default.cs new file mode 100644 index 00000000..14a4969c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Default.cs @@ -0,0 +1,65 @@ +using System; +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public int value; + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct MyUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + public ref int a + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + } + } + + public ref MyStruct s + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + } + } + + public Span buffer + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + } + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("int[4]")] + public fixed int buffer[4]; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Default.xml new file mode 100644 index 00000000..e63ab58b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Default.xml @@ -0,0 +1,53 @@ + + + + + + int + + + + + int + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + + + + ref MyStruct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + + + + Span<int> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + + + + + int + + + MyStruct + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Latest.cs new file mode 100644 index 00000000..982dd3f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.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 int value; + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref int 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 int a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("int[4]")] + public _buffer_e__FixedBuffer buffer; + + [InlineArray(4)] + public partial struct _buffer_e__FixedBuffer + { + public int e0; + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Latest.xml new file mode 100644 index 00000000..65232efa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Latest.xml @@ -0,0 +1,59 @@ + + + + + + int + + + + + int + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + return ref Anonymous.a; + + + + ref MyStruct + + return ref Anonymous.s; + + + + Span<int> + + return Anonymous.buffer; + + + + + int + + + MyStruct + + + int + + + InlineArray(4) + + int + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Preview.cs new file mode 100644 index 00000000..982dd3f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.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 int value; + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref int 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 int a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("int[4]")] + public _buffer_e__FixedBuffer buffer; + + [InlineArray(4)] + public partial struct _buffer_e__FixedBuffer + { + public int e0; + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Preview.xml new file mode 100644 index 00000000..65232efa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Unix.Preview.xml @@ -0,0 +1,59 @@ + + + + + + int + + + + + int + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + return ref Anonymous.a; + + + + ref MyStruct + + return ref Anonymous.s; + + + + Span<int> + + return Anonymous.buffer; + + + + + int + + + MyStruct + + + int + + + InlineArray(4) + + int + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..bd9a11ad --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Compatible.cs @@ -0,0 +1,73 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public int value; + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct MyUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + public ref int 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 int 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 int a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("int[4]")] + public fixed int buffer[4]; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..f68e2efb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Compatible.xml @@ -0,0 +1,62 @@ + + + + + + int + + + + + int + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->a; + } + + + + ref MyStruct + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->s; + } + + + + ref int + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->buffer[0]; + } + + + + + int + + + MyStruct + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Default.cs new file mode 100644 index 00000000..14a4969c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Default.cs @@ -0,0 +1,65 @@ +using System; +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public int value; + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct MyUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + public ref int a + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + } + } + + public ref MyStruct s + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + } + } + + public Span buffer + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + } + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("int[4]")] + public fixed int buffer[4]; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Default.xml new file mode 100644 index 00000000..e63ab58b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Default.xml @@ -0,0 +1,53 @@ + + + + + + int + + + + + int + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + + + + ref MyStruct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + + + + Span<int> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + + + + + int + + + MyStruct + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Latest.cs new file mode 100644 index 00000000..982dd3f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.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 int value; + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref int 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 int a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("int[4]")] + public _buffer_e__FixedBuffer buffer; + + [InlineArray(4)] + public partial struct _buffer_e__FixedBuffer + { + public int e0; + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Latest.xml new file mode 100644 index 00000000..65232efa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Latest.xml @@ -0,0 +1,59 @@ + + + + + + int + + + + + int + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + return ref Anonymous.a; + + + + ref MyStruct + + return ref Anonymous.s; + + + + Span<int> + + return Anonymous.buffer; + + + + + int + + + MyStruct + + + int + + + InlineArray(4) + + int + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Preview.cs new file mode 100644 index 00000000..982dd3f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.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 int value; + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref int 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 int a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("int[4]")] + public _buffer_e__FixedBuffer buffer; + + [InlineArray(4)] + public partial struct _buffer_e__FixedBuffer + { + public int e0; + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Preview.xml new file mode 100644 index 00000000..65232efa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.int.Windows.Preview.xml @@ -0,0 +1,59 @@ + + + + + + int + + + + + int + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + return ref Anonymous.a; + + + + ref MyStruct + + return ref Anonymous.s; + + + + Span<int> + + return Anonymous.buffer; + + + + + int + + + MyStruct + + + int + + + InlineArray(4) + + int + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..19a71d25 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Compatible.cs @@ -0,0 +1,73 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public short value; + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct MyUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + public ref short 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 short 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 short a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("short[4]")] + public fixed short buffer[4]; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..02caefec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Compatible.xml @@ -0,0 +1,62 @@ + + + + + + short + + + + + short + + + short + + + short + + + _Anonymous_e__Union + + + ref short + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->a; + } + + + + ref MyStruct + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->s; + } + + + + ref short + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->buffer[0]; + } + + + + + short + + + MyStruct + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Default.cs new file mode 100644 index 00000000..ca8baa14 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Default.cs @@ -0,0 +1,65 @@ +using System; +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public short value; + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct MyUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + public ref short a + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + } + } + + public ref MyStruct s + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + } + } + + public Span buffer + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + } + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public short a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("short[4]")] + public fixed short buffer[4]; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Default.xml new file mode 100644 index 00000000..edec3eda --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Default.xml @@ -0,0 +1,53 @@ + + + + + + short + + + + + short + + + short + + + short + + + _Anonymous_e__Union + + + ref short + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + + + + ref MyStruct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + + + + Span<short> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + + + + + short + + + MyStruct + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Latest.cs new file mode 100644 index 00000000..a13ee363 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.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 short value; + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref short 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 short a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("short[4]")] + public _buffer_e__FixedBuffer buffer; + + [InlineArray(4)] + public partial struct _buffer_e__FixedBuffer + { + public short e0; + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Latest.xml new file mode 100644 index 00000000..1f4b335c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Latest.xml @@ -0,0 +1,59 @@ + + + + + + short + + + + + short + + + short + + + short + + + _Anonymous_e__Union + + + ref short + + return ref Anonymous.a; + + + + ref MyStruct + + return ref Anonymous.s; + + + + Span<short> + + return Anonymous.buffer; + + + + + short + + + MyStruct + + + short + + + InlineArray(4) + + short + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Preview.cs new file mode 100644 index 00000000..a13ee363 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.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 short value; + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref short 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 short a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("short[4]")] + public _buffer_e__FixedBuffer buffer; + + [InlineArray(4)] + public partial struct _buffer_e__FixedBuffer + { + public short e0; + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Preview.xml new file mode 100644 index 00000000..1f4b335c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Unix.Preview.xml @@ -0,0 +1,59 @@ + + + + + + short + + + + + short + + + short + + + short + + + _Anonymous_e__Union + + + ref short + + return ref Anonymous.a; + + + + ref MyStruct + + return ref Anonymous.s; + + + + Span<short> + + return Anonymous.buffer; + + + + + short + + + MyStruct + + + short + + + InlineArray(4) + + short + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..19a71d25 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Compatible.cs @@ -0,0 +1,73 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public short value; + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct MyUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + public ref short 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 short 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 short a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("short[4]")] + public fixed short buffer[4]; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..02caefec --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Compatible.xml @@ -0,0 +1,62 @@ + + + + + + short + + + + + short + + + short + + + short + + + _Anonymous_e__Union + + + ref short + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->a; + } + + + + ref MyStruct + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->s; + } + + + + ref short + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->buffer[0]; + } + + + + + short + + + MyStruct + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Default.cs new file mode 100644 index 00000000..ca8baa14 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Default.cs @@ -0,0 +1,65 @@ +using System; +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + public partial struct MyStruct + { + public short value; + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct MyUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + public ref short a + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + } + } + + public ref MyStruct s + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + } + } + + public Span buffer + { + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + } + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public short a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("short[4]")] + public fixed short buffer[4]; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Default.xml new file mode 100644 index 00000000..edec3eda --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Default.xml @@ -0,0 +1,53 @@ + + + + + + short + + + + + short + + + short + + + short + + + _Anonymous_e__Union + + + ref short + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + + + + ref MyStruct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); + + + + Span<short> + + return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); + + + + + short + + + MyStruct + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Latest.cs new file mode 100644 index 00000000..a13ee363 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.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 short value; + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref short 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 short a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("short[4]")] + public _buffer_e__FixedBuffer buffer; + + [InlineArray(4)] + public partial struct _buffer_e__FixedBuffer + { + public short e0; + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Latest.xml new file mode 100644 index 00000000..1f4b335c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Latest.xml @@ -0,0 +1,59 @@ + + + + + + short + + + + + short + + + short + + + short + + + _Anonymous_e__Union + + + ref short + + return ref Anonymous.a; + + + + ref MyStruct + + return ref Anonymous.s; + + + + Span<short> + + return Anonymous.buffer; + + + + + short + + + MyStruct + + + short + + + InlineArray(4) + + short + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Preview.cs new file mode 100644 index 00000000..a13ee363 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.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 short value; + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L11_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref short 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 short a; + + [FieldOffset(0)] + public MyStruct s; + + [FieldOffset(0)] + [NativeTypeName("short[4]")] + public _buffer_e__FixedBuffer buffer; + + [InlineArray(4)] + public partial struct _buffer_e__FixedBuffer + { + public short e0; + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Preview.xml new file mode 100644 index 00000000..1f4b335c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousTest.short.Windows.Preview.xml @@ -0,0 +1,59 @@ + + + + + + short + + + + + short + + + short + + + short + + + _Anonymous_e__Union + + + ref short + + return ref Anonymous.a; + + + + ref MyStruct + + return ref Anonymous.s; + + + + Span<short> + + return Anonymous.buffer; + + + + + short + + + MyStruct + + + short + + + InlineArray(4) + + short + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Compatible.cs new file mode 100644 index 00000000..92cacd11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Compatible.cs @@ -0,0 +1,115 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct MyUnion + { + [FieldOffset(0)] + public int x; + + [FieldOffset(0)] + public int y; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L6_C5")] + public _Anonymous_e__Union Anonymous; + + public ref int z + { + get + { + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->z; + } + } + } + + public ref int w + { + get + { + fixed (_Anonymous_e__Union._Anonymous_e__Union* pField = &Anonymous.Anonymous) + { + return ref pField->w; + } + } + } + + public int o0_b0_16 + { + get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int z; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int w; + + [FieldOffset(0)] + 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/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Compatible.xml new file mode 100644 index 00000000..3397f2c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Compatible.xml @@ -0,0 +1,88 @@ + + + + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->z; + } + + + + ref int + + fixed (_Anonymous_e__Union._Anonymous_e__Union* pField = &Anonymous.Anonymous) + { + return ref pField->w; + } + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_e__Union + + + + 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/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.cs new file mode 100644 index 00000000..e781316d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.cs @@ -0,0 +1,109 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public int x; + + [FieldOffset(0)] + public int y; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L6_C5")] + public _Anonymous_e__Union Anonymous; + + public ref int z + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + } + } + + public ref int w + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); + } + } + + public int o0_b0_16 + { + readonly get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + readonly get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int z; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int w; + + [FieldOffset(0)] + 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/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.xml new file mode 100644 index 00000000..dff72bef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Default.xml @@ -0,0 +1,82 @@ + + + + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_e__Union + + + + 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/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Latest.cs new file mode 100644 index 00000000..30c55bd2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Latest.cs @@ -0,0 +1,112 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public int x; + + [FieldOffset(0)] + public int y; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L6_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref int z + { + get + { + return ref Anonymous.z; + } + } + + [UnscopedRef] + public ref int w + { + get + { + return ref Anonymous.Anonymous.w; + } + } + + public int o0_b0_16 + { + readonly get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + readonly get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int z; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int w; + + [FieldOffset(0)] + 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/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Latest.xml new file mode 100644 index 00000000..9b83a6ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Latest.xml @@ -0,0 +1,82 @@ + + + + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + return ref Anonymous.z; + + + + ref int + + return ref Anonymous.Anonymous.w; + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_e__Union + + + + 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/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Preview.cs new file mode 100644 index 00000000..30c55bd2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Preview.cs @@ -0,0 +1,112 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public int x; + + [FieldOffset(0)] + public int y; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L6_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref int z + { + get + { + return ref Anonymous.z; + } + } + + [UnscopedRef] + public ref int w + { + get + { + return ref Anonymous.Anonymous.w; + } + } + + public int o0_b0_16 + { + readonly get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + readonly get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int z; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int w; + + [FieldOffset(0)] + 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/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Preview.xml new file mode 100644 index 00000000..9b83a6ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Unix.Preview.xml @@ -0,0 +1,82 @@ + + + + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + return ref Anonymous.z; + + + + ref int + + return ref Anonymous.Anonymous.w; + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_e__Union + + + + 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/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Compatible.cs new file mode 100644 index 00000000..92cacd11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Compatible.cs @@ -0,0 +1,115 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct MyUnion + { + [FieldOffset(0)] + public int x; + + [FieldOffset(0)] + public int y; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L6_C5")] + public _Anonymous_e__Union Anonymous; + + public ref int z + { + get + { + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->z; + } + } + } + + public ref int w + { + get + { + fixed (_Anonymous_e__Union._Anonymous_e__Union* pField = &Anonymous.Anonymous) + { + return ref pField->w; + } + } + } + + public int o0_b0_16 + { + get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int z; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int w; + + [FieldOffset(0)] + 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/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Compatible.xml new file mode 100644 index 00000000..3397f2c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Compatible.xml @@ -0,0 +1,88 @@ + + + + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->z; + } + + + + ref int + + fixed (_Anonymous_e__Union._Anonymous_e__Union* pField = &Anonymous.Anonymous) + { + return ref pField->w; + } + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_e__Union + + + + 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/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.cs new file mode 100644 index 00000000..e781316d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.cs @@ -0,0 +1,109 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public int x; + + [FieldOffset(0)] + public int y; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L6_C5")] + public _Anonymous_e__Union Anonymous; + + public ref int z + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + } + } + + public ref int w + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); + } + } + + public int o0_b0_16 + { + readonly get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + readonly get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int z; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int w; + + [FieldOffset(0)] + 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/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.xml new file mode 100644 index 00000000..dff72bef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Default.xml @@ -0,0 +1,82 @@ + + + + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); + + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_e__Union + + + + 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/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Latest.cs new file mode 100644 index 00000000..30c55bd2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Latest.cs @@ -0,0 +1,112 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public int x; + + [FieldOffset(0)] + public int y; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L6_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref int z + { + get + { + return ref Anonymous.z; + } + } + + [UnscopedRef] + public ref int w + { + get + { + return ref Anonymous.Anonymous.w; + } + } + + public int o0_b0_16 + { + readonly get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + readonly get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int z; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int w; + + [FieldOffset(0)] + 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/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Latest.xml new file mode 100644 index 00000000..9b83a6ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Latest.xml @@ -0,0 +1,82 @@ + + + + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + return ref Anonymous.z; + + + + ref int + + return ref Anonymous.Anonymous.w; + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_e__Union + + + + 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/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Preview.cs new file mode 100644 index 00000000..30c55bd2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Preview.cs @@ -0,0 +1,112 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public int x; + + [FieldOffset(0)] + public int y; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L6_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref int z + { + get + { + return ref Anonymous.z; + } + } + + [UnscopedRef] + public ref int w + { + get + { + return ref Anonymous.Anonymous.w; + } + } + + public int o0_b0_16 + { + readonly get + { + return Anonymous.Anonymous.o0_b0_16; + } + + set + { + Anonymous.Anonymous.o0_b0_16 = value; + } + } + + public int o0_b16_4 + { + readonly get + { + return Anonymous.Anonymous.o0_b16_4; + } + + set + { + Anonymous.Anonymous.o0_b16_4 = value; + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int z; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L10_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public int w; + + [FieldOffset(0)] + 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/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Preview.xml new file mode 100644 index 00000000..9b83a6ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedAnonymousWithBitfieldTest.Windows.Preview.xml @@ -0,0 +1,82 @@ + + + + + + int + + + int + + + _Anonymous_e__Union + + + ref int + + return ref Anonymous.z; + + + + ref int + + return ref Anonymous.Anonymous.w; + + + + int + + return Anonymous.Anonymous.o0_b0_16; + + + Anonymous.Anonymous.o0_b0_16 = value; + + + + int + + return Anonymous.Anonymous.o0_b16_4; + + + Anonymous.Anonymous.o0_b16_4 = value; + + + + + int + + + _Anonymous_e__Union + + + + 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/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..9105b91f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Compatible.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public double r; + + [FieldOffset(0)] + public double g; + + [FieldOffset(0)] + public double b; + + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..e052ae72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Default.cs new file mode 100644 index 00000000..9105b91f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Default.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public double r; + + [FieldOffset(0)] + public double g; + + [FieldOffset(0)] + public double b; + + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Default.xml new file mode 100644 index 00000000..e052ae72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Latest.cs new file mode 100644 index 00000000..9105b91f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Latest.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public double r; + + [FieldOffset(0)] + public double g; + + [FieldOffset(0)] + public double b; + + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Latest.xml new file mode 100644 index 00000000..e052ae72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Preview.cs new file mode 100644 index 00000000..9105b91f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Preview.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public double r; + + [FieldOffset(0)] + public double g; + + [FieldOffset(0)] + public double b; + + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Preview.xml new file mode 100644 index 00000000..e052ae72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..9105b91f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Compatible.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public double r; + + [FieldOffset(0)] + public double g; + + [FieldOffset(0)] + public double b; + + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..e052ae72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Default.cs new file mode 100644 index 00000000..9105b91f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Default.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public double r; + + [FieldOffset(0)] + public double g; + + [FieldOffset(0)] + public double b; + + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Default.xml new file mode 100644 index 00000000..e052ae72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Latest.cs new file mode 100644 index 00000000..9105b91f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Latest.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public double r; + + [FieldOffset(0)] + public double g; + + [FieldOffset(0)] + public double b; + + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Latest.xml new file mode 100644 index 00000000..e052ae72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Preview.cs new file mode 100644 index 00000000..9105b91f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Preview.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public double r; + + [FieldOffset(0)] + public double g; + + [FieldOffset(0)] + public double b; + + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Preview.xml new file mode 100644 index 00000000..e052ae72 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.double.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + + double + + + double + + + double + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..004f4457 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Compatible.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public float r; + + [FieldOffset(0)] + public float g; + + [FieldOffset(0)] + public float b; + + [FieldOffset(0)] + public float a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..65d96f36 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Default.cs new file mode 100644 index 00000000..004f4457 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Default.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public float r; + + [FieldOffset(0)] + public float g; + + [FieldOffset(0)] + public float b; + + [FieldOffset(0)] + public float a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Default.xml new file mode 100644 index 00000000..65d96f36 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Latest.cs new file mode 100644 index 00000000..004f4457 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Latest.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public float r; + + [FieldOffset(0)] + public float g; + + [FieldOffset(0)] + public float b; + + [FieldOffset(0)] + public float a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Latest.xml new file mode 100644 index 00000000..65d96f36 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Preview.cs new file mode 100644 index 00000000..004f4457 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Preview.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public float r; + + [FieldOffset(0)] + public float g; + + [FieldOffset(0)] + public float b; + + [FieldOffset(0)] + public float a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Preview.xml new file mode 100644 index 00000000..65d96f36 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..004f4457 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Compatible.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public float r; + + [FieldOffset(0)] + public float g; + + [FieldOffset(0)] + public float b; + + [FieldOffset(0)] + public float a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..65d96f36 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Default.cs new file mode 100644 index 00000000..004f4457 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Default.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public float r; + + [FieldOffset(0)] + public float g; + + [FieldOffset(0)] + public float b; + + [FieldOffset(0)] + public float a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Default.xml new file mode 100644 index 00000000..65d96f36 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Latest.cs new file mode 100644 index 00000000..004f4457 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Latest.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public float r; + + [FieldOffset(0)] + public float g; + + [FieldOffset(0)] + public float b; + + [FieldOffset(0)] + public float a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Latest.xml new file mode 100644 index 00000000..65d96f36 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Preview.cs new file mode 100644 index 00000000..004f4457 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Preview.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public float r; + + [FieldOffset(0)] + public float g; + + [FieldOffset(0)] + public float b; + + [FieldOffset(0)] + public float a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Preview.xml new file mode 100644 index 00000000..65d96f36 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.float.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + float + + + float + + + float + + + + float + + + float + + + float + + + float + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..8323fd11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Compatible.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + public int a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..067630a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Default.cs new file mode 100644 index 00000000..8323fd11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Default.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + public int a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Default.xml new file mode 100644 index 00000000..067630a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Latest.cs new file mode 100644 index 00000000..8323fd11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Latest.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + public int a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Latest.xml new file mode 100644 index 00000000..067630a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Preview.cs new file mode 100644 index 00000000..8323fd11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Preview.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + public int a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Preview.xml new file mode 100644 index 00000000..067630a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..8323fd11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Compatible.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + public int a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..067630a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Default.cs new file mode 100644 index 00000000..8323fd11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Default.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + public int a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Default.xml new file mode 100644 index 00000000..067630a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Latest.cs new file mode 100644 index 00000000..8323fd11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Latest.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + public int a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Latest.xml new file mode 100644 index 00000000..067630a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Preview.cs new file mode 100644 index 00000000..8323fd11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Preview.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public int r; + + [FieldOffset(0)] + public int g; + + [FieldOffset(0)] + public int b; + + [FieldOffset(0)] + public int a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Preview.xml new file mode 100644 index 00000000..067630a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.int.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + int + + + int + + + int + + + + int + + + int + + + int + + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..505ec6b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Compatible.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + public short a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..168e23b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Default.cs new file mode 100644 index 00000000..505ec6b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Default.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + public short a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Default.xml new file mode 100644 index 00000000..168e23b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Latest.cs new file mode 100644 index 00000000..505ec6b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Latest.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + public short a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Latest.xml new file mode 100644 index 00000000..168e23b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Preview.cs new file mode 100644 index 00000000..505ec6b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Preview.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + public short a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Preview.xml new file mode 100644 index 00000000..168e23b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..505ec6b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Compatible.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + public short a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..168e23b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Default.cs new file mode 100644 index 00000000..505ec6b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Default.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + public short a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Default.xml new file mode 100644 index 00000000..168e23b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Latest.cs new file mode 100644 index 00000000..505ec6b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Latest.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + public short a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Latest.xml new file mode 100644 index 00000000..168e23b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Preview.cs new file mode 100644 index 00000000..505ec6b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Preview.cs @@ -0,0 +1,33 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + public short r; + + [FieldOffset(0)] + public short g; + + [FieldOffset(0)] + public short b; + + [FieldOffset(0)] + public short a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Preview.xml new file mode 100644 index 00000000..168e23b2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedTest.short.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + short + + + short + + + short + + + + short + + + short + + + short + + + short + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.cs new file mode 100644 index 00000000..95859d81 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.xml new file mode 100644 index 00000000..e2180b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.cs new file mode 100644 index 00000000..95859d81 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.xml new file mode 100644 index 00000000..e2180b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.cs new file mode 100644 index 00000000..95859d81 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.xml new file mode 100644 index 00000000..e2180b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.cs new file mode 100644 index 00000000..95859d81 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.xml new file mode 100644 index 00000000..e2180b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.cs new file mode 100644 index 00000000..95859d81 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.xml new file mode 100644 index 00000000..e2180b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.cs new file mode 100644 index 00000000..95859d81 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.xml new file mode 100644 index 00000000..e2180b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.cs new file mode 100644 index 00000000..95859d81 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.xml new file mode 100644 index 00000000..e2180b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.cs new file mode 100644 index 00000000..95859d81 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("bool")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.xml new file mode 100644 index 00000000..e2180b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.bool.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..36d16ac1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("long long")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long b; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..9b168476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.cs new file mode 100644 index 00000000..36d16ac1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("long long")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long b; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.xml new file mode 100644 index 00000000..9b168476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..36d16ac1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("long long")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long b; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..9b168476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..36d16ac1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("long long")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long b; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..9b168476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..36d16ac1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("long long")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long b; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..9b168476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.cs new file mode 100644 index 00000000..36d16ac1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("long long")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long b; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.xml new file mode 100644 index 00000000..9b168476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..36d16ac1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("long long")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long b; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..9b168476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..36d16ac1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("long long")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long b; + + [FieldOffset(0)] + [NativeTypeName("long long")] + public long a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..9b168476 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.long long.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + long + + + long + + + long + + + + long + + + long + + + long + + + long + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..32407748 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte b; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..c8fbea89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..32407748 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte b; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..c8fbea89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..32407748 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte b; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..c8fbea89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..32407748 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte b; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..c8fbea89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..32407748 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte b; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..c8fbea89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..32407748 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte b; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..c8fbea89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..32407748 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte b; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..c8fbea89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..32407748 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte b; + + [FieldOffset(0)] + [NativeTypeName("signed char")] + public sbyte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..c8fbea89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.signed char.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + sbyte + + + sbyte + + + sbyte + + + sbyte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..d1f27b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..c5fa92ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..d1f27b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..c5fa92ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..d1f27b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..c5fa92ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..d1f27b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..c5fa92ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..d1f27b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..c5fa92ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..d1f27b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..c5fa92ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..d1f27b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..c5fa92ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..d1f27b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte b; + + [FieldOffset(0)] + [NativeTypeName("unsigned char")] + public byte a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..c5fa92ab --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + byte + + + byte + + + byte + + + + byte + + + byte + + + byte + + + byte + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..93ea852a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint b; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..3389a7f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..93ea852a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint b; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..3389a7f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..93ea852a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint b; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..3389a7f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..93ea852a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint b; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..3389a7f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..93ea852a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint b; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..3389a7f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..93ea852a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint b; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..3389a7f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..93ea852a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint b; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..3389a7f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..93ea852a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint b; + + [FieldOffset(0)] + [NativeTypeName("unsigned int")] + public uint a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..3389a7f7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + uint + + + uint + + + uint + + + + uint + + + uint + + + uint + + + uint + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..e109fd75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [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; + + [FieldOffset(0)] + [NativeTypeName("unsigned long long")] + public ulong a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..af782941 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..e109fd75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [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; + + [FieldOffset(0)] + [NativeTypeName("unsigned long long")] + public ulong a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..af782941 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..e109fd75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [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; + + [FieldOffset(0)] + [NativeTypeName("unsigned long long")] + public ulong a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..af782941 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..e109fd75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [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; + + [FieldOffset(0)] + [NativeTypeName("unsigned long long")] + public ulong a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..af782941 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..e109fd75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [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; + + [FieldOffset(0)] + [NativeTypeName("unsigned long long")] + public ulong a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..af782941 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..e109fd75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [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; + + [FieldOffset(0)] + [NativeTypeName("unsigned long long")] + public ulong a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..af782941 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..e109fd75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [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; + + [FieldOffset(0)] + [NativeTypeName("unsigned long long")] + public ulong a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..af782941 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..e109fd75 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [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; + + [FieldOffset(0)] + [NativeTypeName("unsigned long long")] + public ulong a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..af782941 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + ulong + + + ulong + + + ulong + + + + ulong + + + ulong + + + ulong + + + ulong + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..8cb01d68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort b; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..cd3df1c8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..8cb01d68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort b; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..cd3df1c8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..8cb01d68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort b; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..cd3df1c8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..8cb01d68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort b; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..cd3df1c8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..8cb01d68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort b; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..cd3df1c8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..8cb01d68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort b; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..cd3df1c8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..8cb01d68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort b; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..cd3df1c8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..8cb01d68 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.cs @@ -0,0 +1,40 @@ +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; + + [StructLayout(LayoutKind.Explicit)] + public partial struct MyNestedUnion + { + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort b; + + [FieldOffset(0)] + [NativeTypeName("unsigned short")] + public ushort a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..cd3df1c8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NestedWithNativeTypeNameTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + ushort + + + ushort + + + ushort + + + + ushort + + + ushort + + + ushort + + + ushort + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Compatible.cs new file mode 100644 index 00000000..6318f6f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Compatible.cs @@ -0,0 +1,29 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public new int Equals; + + [FieldOffset(0)] + public int Dispose; + + [FieldOffset(0)] + public new int GetHashCode; + + [FieldOffset(0)] + public new int GetType; + + [FieldOffset(0)] + public new int MemberwiseClone; + + [FieldOffset(0)] + public new int ReferenceEquals; + + [FieldOffset(0)] + public new int ToString; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Compatible.xml new file mode 100644 index 00000000..506b9fed --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Compatible.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Default.cs new file mode 100644 index 00000000..6318f6f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Default.cs @@ -0,0 +1,29 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public new int Equals; + + [FieldOffset(0)] + public int Dispose; + + [FieldOffset(0)] + public new int GetHashCode; + + [FieldOffset(0)] + public new int GetType; + + [FieldOffset(0)] + public new int MemberwiseClone; + + [FieldOffset(0)] + public new int ReferenceEquals; + + [FieldOffset(0)] + public new int ToString; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Default.xml new file mode 100644 index 00000000..506b9fed --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Default.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Latest.cs new file mode 100644 index 00000000..6318f6f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Latest.cs @@ -0,0 +1,29 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public new int Equals; + + [FieldOffset(0)] + public int Dispose; + + [FieldOffset(0)] + public new int GetHashCode; + + [FieldOffset(0)] + public new int GetType; + + [FieldOffset(0)] + public new int MemberwiseClone; + + [FieldOffset(0)] + public new int ReferenceEquals; + + [FieldOffset(0)] + public new int ToString; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Latest.xml new file mode 100644 index 00000000..506b9fed --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Latest.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Preview.cs new file mode 100644 index 00000000..6318f6f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Preview.cs @@ -0,0 +1,29 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public new int Equals; + + [FieldOffset(0)] + public int Dispose; + + [FieldOffset(0)] + public new int GetHashCode; + + [FieldOffset(0)] + public new int GetType; + + [FieldOffset(0)] + public new int MemberwiseClone; + + [FieldOffset(0)] + public new int ReferenceEquals; + + [FieldOffset(0)] + public new int ToString; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Preview.xml new file mode 100644 index 00000000..506b9fed --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Unix.Preview.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Compatible.cs new file mode 100644 index 00000000..6318f6f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Compatible.cs @@ -0,0 +1,29 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public new int Equals; + + [FieldOffset(0)] + public int Dispose; + + [FieldOffset(0)] + public new int GetHashCode; + + [FieldOffset(0)] + public new int GetType; + + [FieldOffset(0)] + public new int MemberwiseClone; + + [FieldOffset(0)] + public new int ReferenceEquals; + + [FieldOffset(0)] + public new int ToString; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Compatible.xml new file mode 100644 index 00000000..506b9fed --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Compatible.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Default.cs new file mode 100644 index 00000000..6318f6f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Default.cs @@ -0,0 +1,29 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public new int Equals; + + [FieldOffset(0)] + public int Dispose; + + [FieldOffset(0)] + public new int GetHashCode; + + [FieldOffset(0)] + public new int GetType; + + [FieldOffset(0)] + public new int MemberwiseClone; + + [FieldOffset(0)] + public new int ReferenceEquals; + + [FieldOffset(0)] + public new int ToString; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Default.xml new file mode 100644 index 00000000..506b9fed --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Default.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Latest.cs new file mode 100644 index 00000000..6318f6f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Latest.cs @@ -0,0 +1,29 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public new int Equals; + + [FieldOffset(0)] + public int Dispose; + + [FieldOffset(0)] + public new int GetHashCode; + + [FieldOffset(0)] + public new int GetType; + + [FieldOffset(0)] + public new int MemberwiseClone; + + [FieldOffset(0)] + public new int ReferenceEquals; + + [FieldOffset(0)] + public new int ToString; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Latest.xml new file mode 100644 index 00000000..506b9fed --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Latest.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Preview.cs new file mode 100644 index 00000000..6318f6f4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Preview.cs @@ -0,0 +1,29 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + public new int Equals; + + [FieldOffset(0)] + public int Dispose; + + [FieldOffset(0)] + public new int GetHashCode; + + [FieldOffset(0)] + public new int GetType; + + [FieldOffset(0)] + public new int MemberwiseClone; + + [FieldOffset(0)] + public new int ReferenceEquals; + + [FieldOffset(0)] + public new int ToString; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Preview.xml new file mode 100644 index 00000000..506b9fed --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NewKeywordTest.Windows.Preview.xml @@ -0,0 +1,28 @@ + + + + + + int + + + int + + + int + + + int + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Compatible.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Compatible.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Compatible.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Compatible.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Default.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Default.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Default.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Default.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Latest.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Latest.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Latest.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Latest.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Preview.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Preview.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Preview.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Unix.Preview.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Compatible.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Compatible.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Compatible.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Compatible.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Default.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Default.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Default.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Default.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Latest.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Latest.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Latest.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Latest.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Preview.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Preview.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Preview.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.NoDefinitionTest.Windows.Preview.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Compatible.cs new file mode 100644 index 00000000..e0cf22c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Compatible.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Compatible.xml new file mode 100644 index 00000000..eae07465 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Default.cs new file mode 100644 index 00000000..e0cf22c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Default.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Default.xml new file mode 100644 index 00000000..eae07465 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Latest.cs new file mode 100644 index 00000000..e0cf22c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Latest.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Latest.xml new file mode 100644 index 00000000..eae07465 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Preview.cs new file mode 100644 index 00000000..e0cf22c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Preview.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Preview.xml new file mode 100644 index 00000000..eae07465 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Compatible.cs new file mode 100644 index 00000000..e0cf22c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Compatible.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Compatible.xml new file mode 100644 index 00000000..eae07465 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Default.cs new file mode 100644 index 00000000..e0cf22c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Default.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Default.xml new file mode 100644 index 00000000..eae07465 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Latest.cs new file mode 100644 index 00000000..e0cf22c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Latest.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Latest.xml new file mode 100644 index 00000000..eae07465 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Preview.cs new file mode 100644 index 00000000..e0cf22c5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Preview.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Preview.xml new file mode 100644 index 00000000..eae07465 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfTest.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.cs new file mode 100644 index 00000000..911f6f89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + [NativeTypeName("example_t *")] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.xml new file mode 100644 index 00000000..10212799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.cs new file mode 100644 index 00000000..911f6f89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + [NativeTypeName("example_t *")] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.xml new file mode 100644 index 00000000..10212799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.cs new file mode 100644 index 00000000..911f6f89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + [NativeTypeName("example_t *")] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.xml new file mode 100644 index 00000000..10212799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.cs new file mode 100644 index 00000000..911f6f89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + [NativeTypeName("example_t *")] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.xml new file mode 100644 index 00000000..10212799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.cs new file mode 100644 index 00000000..911f6f89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + [NativeTypeName("example_t *")] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.xml new file mode 100644 index 00000000..10212799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.cs new file mode 100644 index 00000000..911f6f89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + [NativeTypeName("example_t *")] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.xml new file mode 100644 index 00000000..10212799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.cs new file mode 100644 index 00000000..911f6f89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + [NativeTypeName("example_t *")] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.xml new file mode 100644 index 00000000..10212799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.cs new file mode 100644 index 00000000..911f6f89 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct example_s + { + [FieldOffset(0)] + [NativeTypeName("example_t *")] + public example_s* next; + + [FieldOffset(0)] + public void* data; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.xml new file mode 100644 index 00000000..10212799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.PointerToSelfViaTypedefTest.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + example_s* + + + void* + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Compatible.cs new file mode 100644 index 00000000..d72467af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Compatible.cs @@ -0,0 +1,39 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [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_L7_C5")] + public _Anonymous_e__Union Anonymous; + + public ref double a + { + get + { + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->a; + } + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Compatible.xml new file mode 100644 index 00000000..fd320494 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Compatible.xml @@ -0,0 +1,33 @@ + + + + + + double + + + double + + + double + + + _Anonymous_e__Union + + + ref double + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->a; + } + + + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Default.cs new file mode 100644 index 00000000..4f8bfccc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Default.cs @@ -0,0 +1,36 @@ +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; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C5")] + public _Anonymous_e__Union Anonymous; + + public ref double a + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Default.xml new file mode 100644 index 00000000..f8a9d6e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Default.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + _Anonymous_e__Union + + + ref double + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + + + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Latest.cs new file mode 100644 index 00000000..320dbb0a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Latest.cs @@ -0,0 +1,38 @@ +using System.Diagnostics.CodeAnalysis; +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; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref double a + { + get + { + return ref Anonymous.a; + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Latest.xml new file mode 100644 index 00000000..3897ae23 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Latest.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + _Anonymous_e__Union + + + ref double + + return ref Anonymous.a; + + + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Preview.cs new file mode 100644 index 00000000..320dbb0a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Preview.cs @@ -0,0 +1,38 @@ +using System.Diagnostics.CodeAnalysis; +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; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref double a + { + get + { + return ref Anonymous.a; + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Preview.xml new file mode 100644 index 00000000..3897ae23 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Unix.Preview.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + _Anonymous_e__Union + + + ref double + + return ref Anonymous.a; + + + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Compatible.cs new file mode 100644 index 00000000..d72467af --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Compatible.cs @@ -0,0 +1,39 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [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_L7_C5")] + public _Anonymous_e__Union Anonymous; + + public ref double a + { + get + { + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->a; + } + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Compatible.xml new file mode 100644 index 00000000..fd320494 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Compatible.xml @@ -0,0 +1,33 @@ + + + + + + double + + + double + + + double + + + _Anonymous_e__Union + + + ref double + + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->a; + } + + + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Default.cs new file mode 100644 index 00000000..4f8bfccc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Default.cs @@ -0,0 +1,36 @@ +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; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C5")] + public _Anonymous_e__Union Anonymous; + + public ref double a + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Default.xml new file mode 100644 index 00000000..f8a9d6e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Default.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + _Anonymous_e__Union + + + ref double + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); + + + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Latest.cs new file mode 100644 index 00000000..320dbb0a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Latest.cs @@ -0,0 +1,38 @@ +using System.Diagnostics.CodeAnalysis; +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; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref double a + { + get + { + return ref Anonymous.a; + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Latest.xml new file mode 100644 index 00000000..3897ae23 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Latest.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + _Anonymous_e__Union + + + ref double + + return ref Anonymous.a; + + + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Preview.cs new file mode 100644 index 00000000..320dbb0a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Preview.cs @@ -0,0 +1,38 @@ +using System.Diagnostics.CodeAnalysis; +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; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C5")] + public _Anonymous_e__Union Anonymous; + + [UnscopedRef] + public ref double a + { + get + { + return ref Anonymous.a; + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public double a; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Preview.xml new file mode 100644 index 00000000..3897ae23 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapNestedAnonymousTest.Windows.Preview.xml @@ -0,0 +1,30 @@ + + + + + + double + + + double + + + double + + + _Anonymous_e__Union + + + ref double + + return ref Anonymous.a; + + + + + double + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Compatible.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Compatible.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Compatible.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Compatible.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Default.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Default.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Default.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Default.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Latest.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Latest.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Latest.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Latest.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Preview.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Preview.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Preview.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Unix.Preview.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Compatible.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Compatible.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Compatible.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Compatible.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Default.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Default.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Default.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Default.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Latest.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Latest.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Latest.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Latest.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Preview.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Preview.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Preview.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.RemapTest.Windows.Preview.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Compatible.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Default.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Latest.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Unix.Preview.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Compatible.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Default.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Latest.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.cs new file mode 100644 index 00000000..05febc9b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.xml new file mode 100644 index 00000000..269a2ea0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionPointerTest.Windows.Preview.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.cs new file mode 100644 index 00000000..992158fa --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.xml new file mode 100644 index 00000000..35fcc2b6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.double.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.cs new file mode 100644 index 00000000..f08785b8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.xml new file mode 100644 index 00000000..9c2e176d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.float.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.cs new file mode 100644 index 00000000..efdc9f8a --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.xml new file mode 100644 index 00000000..5d7c9ff3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.cs new file mode 100644 index 00000000..e7369e88 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.xml new file mode 100644 index 00000000..11f5b08d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionTest.short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.cs new file mode 100644 index 00000000..83eef48e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.xml new file mode 100644 index 00000000..94027b07 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.bool.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..7458cdde --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..478b8af8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..9f04efdb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..0b2b4a22 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.signed char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..2e955545 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..b6473799 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..339b1f62 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..ac1fc227 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..71b3faa2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..07911724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..5b8b0295 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.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/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..7f601889 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.SkipNonDefinitionWithNativeTypeNameTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Compatible.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Compatible.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Default.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Default.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Latest.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Latest.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Preview.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Preview.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Compatible.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Compatible.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Default.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Default.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Latest.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Latest.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Preview.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Preview.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.bool.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..6e15977d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..38238ac2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Default.cs new file mode 100644 index 00000000..6e15977d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Default.xml new file mode 100644 index 00000000..38238ac2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Latest.cs new file mode 100644 index 00000000..6e15977d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Latest.xml new file mode 100644 index 00000000..38238ac2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Preview.cs new file mode 100644 index 00000000..6e15977d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Preview.xml new file mode 100644 index 00000000..38238ac2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..6e15977d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..38238ac2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Default.cs new file mode 100644 index 00000000..6e15977d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Default.xml new file mode 100644 index 00000000..38238ac2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Latest.cs new file mode 100644 index 00000000..6e15977d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Latest.xml new file mode 100644 index 00000000..38238ac2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Preview.cs new file mode 100644 index 00000000..6e15977d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public double b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Preview.xml new file mode 100644 index 00000000..38238ac2 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.double.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + double + + + double + + + double + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..ba5dc575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..4ce5abcc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Default.cs new file mode 100644 index 00000000..ba5dc575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Default.xml new file mode 100644 index 00000000..4ce5abcc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Latest.cs new file mode 100644 index 00000000..ba5dc575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Latest.xml new file mode 100644 index 00000000..4ce5abcc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Preview.cs new file mode 100644 index 00000000..ba5dc575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Preview.xml new file mode 100644 index 00000000..4ce5abcc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..ba5dc575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..4ce5abcc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Default.cs new file mode 100644 index 00000000..ba5dc575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Default.xml new file mode 100644 index 00000000..4ce5abcc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Latest.cs new file mode 100644 index 00000000..ba5dc575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Latest.xml new file mode 100644 index 00000000..4ce5abcc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Preview.cs new file mode 100644 index 00000000..ba5dc575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public float b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Preview.xml new file mode 100644 index 00000000..4ce5abcc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.float.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + float + + + float + + + float + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..4b5466ef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..97ee5ef7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Default.cs new file mode 100644 index 00000000..4b5466ef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Default.xml new file mode 100644 index 00000000..97ee5ef7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Latest.cs new file mode 100644 index 00000000..4b5466ef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Latest.xml new file mode 100644 index 00000000..97ee5ef7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Preview.cs new file mode 100644 index 00000000..4b5466ef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Preview.xml new file mode 100644 index 00000000..97ee5ef7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..4b5466ef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..97ee5ef7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Default.cs new file mode 100644 index 00000000..4b5466ef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Default.xml new file mode 100644 index 00000000..97ee5ef7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Latest.cs new file mode 100644 index 00000000..4b5466ef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Latest.xml new file mode 100644 index 00000000..97ee5ef7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Preview.cs new file mode 100644 index 00000000..4b5466ef --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public int b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Preview.xml new file mode 100644 index 00000000..97ee5ef7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + int + + + int + + + int + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..db92bb21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..b15f5749 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Default.cs new file mode 100644 index 00000000..db92bb21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Default.xml new file mode 100644 index 00000000..b15f5749 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..db92bb21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..b15f5749 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..db92bb21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..b15f5749 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..db92bb21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..b15f5749 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Default.cs new file mode 100644 index 00000000..db92bb21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Default.xml new file mode 100644 index 00000000..b15f5749 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..db92bb21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..b15f5749 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..db92bb21 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public long b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..b15f5749 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + long + + + long + + + long + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..e0839f11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..697e4885 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Default.cs new file mode 100644 index 00000000..e0839f11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Default.xml new file mode 100644 index 00000000..697e4885 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Latest.cs new file mode 100644 index 00000000..e0839f11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Latest.xml new file mode 100644 index 00000000..697e4885 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Preview.cs new file mode 100644 index 00000000..e0839f11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Preview.xml new file mode 100644 index 00000000..697e4885 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..e0839f11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..697e4885 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Default.cs new file mode 100644 index 00000000..e0839f11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Default.xml new file mode 100644 index 00000000..697e4885 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Latest.cs new file mode 100644 index 00000000..e0839f11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Latest.xml new file mode 100644 index 00000000..697e4885 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Preview.cs new file mode 100644 index 00000000..e0839f11 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public short b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Preview.xml new file mode 100644 index 00000000..697e4885 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + short + + + short + + + short + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..acfc35ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..ea001784 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..acfc35ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..ea001784 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..acfc35ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..ea001784 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..acfc35ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..ea001784 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..acfc35ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..ea001784 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..acfc35ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..ea001784 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..acfc35ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..ea001784 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..acfc35ff --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public sbyte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..ea001784 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.signed char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + sbyte + + + sbyte + + + sbyte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..b25e13f6 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public byte b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..31816fdd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + byte + + + byte + + + byte + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..06bd8fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..4c9780f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..06bd8fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..4c9780f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..06bd8fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..4c9780f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..06bd8fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..4c9780f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..06bd8fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..4c9780f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..06bd8fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..4c9780f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..06bd8fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..4c9780f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..06bd8fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public uint b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..4c9780f5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + uint + + + uint + + + uint + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..87dbd7e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..81a2de66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..87dbd7e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..81a2de66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..87dbd7e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..81a2de66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..87dbd7e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..81a2de66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..87dbd7e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..81a2de66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..87dbd7e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..81a2de66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..87dbd7e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..81a2de66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..87dbd7e1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ulong b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..81a2de66 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ulong + + + ulong + + + ulong + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..9d1283f8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..4fe24e7c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..9d1283f8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..4fe24e7c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Default.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..9d1283f8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..4fe24e7c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..9d1283f8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..4fe24e7c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..9d1283f8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..4fe24e7c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..9d1283f8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Default.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..4fe24e7c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Default.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..9d1283f8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Latest.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..4fe24e7c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..9d1283f8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Preview.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct MyUnion + { + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort r; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort g; + + [FieldOffset(0)] + [NativeTypeName("MyTypedefAlias")] + public ushort b; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..4fe24e7c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.TypedefTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,16 @@ + + + + + + ushort + + + ushort + + + ushort + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Compatible.cs new file mode 100644 index 00000000..d1d08dcf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Compatible.cs @@ -0,0 +1,82 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct _MY_UNION + { + [FieldOffset(0)] + [NativeTypeName("long[2]")] + public fixed int AsArray[2]; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L4_C5")] + public _Anonymous_e__Struct Anonymous; + + public ref int First + { + get + { + fixed (_Anonymous_e__Struct* pField = &Anonymous) + { + return ref pField->First; + } + } + } + + public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A + { + get + { + fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) + { + return ref pField->A; + } + } + } + + public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B + { + get + { + fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) + { + return ref pField->B; + } + } + } + + public unsafe partial struct _Anonymous_e__Struct + { + [NativeTypeName("long")] + public int First; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L9_C13")] + public _A_e__Struct A; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C13")] + public _B_e__Struct B; + + public partial struct _A_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + + public partial struct _B_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Compatible.xml new file mode 100644 index 00000000..29760292 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Compatible.xml @@ -0,0 +1,66 @@ + + + + + + int + + + _Anonymous_e__Struct + + + ref int + + fixed (_Anonymous_e__Struct* pField = &Anonymous) + { + return ref pField->First; + } + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct + + fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) + { + return ref pField->A; + } + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct + + fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) + { + return ref pField->B; + } + + + + + int + + + _Anonymous_e__Union + + + + _A_e__Struct + + + _B_e__Struct + + + + int + + + + + int + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Default.cs new file mode 100644 index 00000000..1d4b62fb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Default.cs @@ -0,0 +1,73 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct _MY_UNION + { + [FieldOffset(0)] + [NativeTypeName("long[2]")] + public fixed int AsArray[2]; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L4_C5")] + public _Anonymous_e__Struct Anonymous; + + public ref int First + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.First, 1)); + } + } + + public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.A, 1)); + } + } + + public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.B, 1)); + } + } + + public partial struct _Anonymous_e__Struct + { + [NativeTypeName("long")] + public int First; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L9_C13")] + public _A_e__Struct A; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C13")] + public _B_e__Struct B; + + public partial struct _A_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + + public partial struct _B_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Default.xml new file mode 100644 index 00000000..f1bc3681 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Default.xml @@ -0,0 +1,57 @@ + + + + + + int + + + _Anonymous_e__Struct + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.First, 1)); + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.A, 1)); + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.B, 1)); + + + + + int + + + _Anonymous_e__Union + + + + _A_e__Struct + + + _B_e__Struct + + + + int + + + + + int + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Latest.cs new file mode 100644 index 00000000..0b542be9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Latest.cs @@ -0,0 +1,84 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct _MY_UNION + { + [FieldOffset(0)] + [NativeTypeName("long[2]")] + public _AsArray_e__FixedBuffer AsArray; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L4_C5")] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref int First + { + get + { + return ref Anonymous.First; + } + } + + [UnscopedRef] + public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A + { + get + { + return ref Anonymous.Anonymous.A; + } + } + + [UnscopedRef] + public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B + { + get + { + return ref Anonymous.Anonymous.B; + } + } + + public partial struct _Anonymous_e__Struct + { + [NativeTypeName("long")] + public int First; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L9_C13")] + public _A_e__Struct A; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C13")] + public _B_e__Struct B; + + public partial struct _A_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + + public partial struct _B_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + } + } + + [InlineArray(2)] + public partial struct _AsArray_e__FixedBuffer + { + public int e0; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Latest.xml new file mode 100644 index 00000000..4aab4c78 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Latest.xml @@ -0,0 +1,63 @@ + + + + + + int + + + _Anonymous_e__Struct + + + ref int + + return ref Anonymous.First; + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct + + return ref Anonymous.Anonymous.A; + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct + + return ref Anonymous.Anonymous.B; + + + + + int + + + _Anonymous_e__Union + + + + _A_e__Struct + + + _B_e__Struct + + + + int + + + + + int + + + + + + InlineArray(2) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Preview.cs new file mode 100644 index 00000000..0b542be9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Preview.cs @@ -0,0 +1,84 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct _MY_UNION + { + [FieldOffset(0)] + [NativeTypeName("long[2]")] + public _AsArray_e__FixedBuffer AsArray; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L4_C5")] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref int First + { + get + { + return ref Anonymous.First; + } + } + + [UnscopedRef] + public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A + { + get + { + return ref Anonymous.Anonymous.A; + } + } + + [UnscopedRef] + public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B + { + get + { + return ref Anonymous.Anonymous.B; + } + } + + public partial struct _Anonymous_e__Struct + { + [NativeTypeName("long")] + public int First; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L9_C13")] + public _A_e__Struct A; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C13")] + public _B_e__Struct B; + + public partial struct _A_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + + public partial struct _B_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + } + } + + [InlineArray(2)] + public partial struct _AsArray_e__FixedBuffer + { + public int e0; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Preview.xml new file mode 100644 index 00000000..4aab4c78 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Unix.Preview.xml @@ -0,0 +1,63 @@ + + + + + + int + + + _Anonymous_e__Struct + + + ref int + + return ref Anonymous.First; + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct + + return ref Anonymous.Anonymous.A; + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct + + return ref Anonymous.Anonymous.B; + + + + + int + + + _Anonymous_e__Union + + + + _A_e__Struct + + + _B_e__Struct + + + + int + + + + + int + + + + + + InlineArray(2) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Compatible.cs new file mode 100644 index 00000000..d1d08dcf --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Compatible.cs @@ -0,0 +1,82 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct _MY_UNION + { + [FieldOffset(0)] + [NativeTypeName("long[2]")] + public fixed int AsArray[2]; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L4_C5")] + public _Anonymous_e__Struct Anonymous; + + public ref int First + { + get + { + fixed (_Anonymous_e__Struct* pField = &Anonymous) + { + return ref pField->First; + } + } + } + + public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A + { + get + { + fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) + { + return ref pField->A; + } + } + } + + public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B + { + get + { + fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) + { + return ref pField->B; + } + } + } + + public unsafe partial struct _Anonymous_e__Struct + { + [NativeTypeName("long")] + public int First; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L9_C13")] + public _A_e__Struct A; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C13")] + public _B_e__Struct B; + + public partial struct _A_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + + public partial struct _B_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Compatible.xml new file mode 100644 index 00000000..29760292 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Compatible.xml @@ -0,0 +1,66 @@ + + + + + + int + + + _Anonymous_e__Struct + + + ref int + + fixed (_Anonymous_e__Struct* pField = &Anonymous) + { + return ref pField->First; + } + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct + + fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) + { + return ref pField->A; + } + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct + + fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) + { + return ref pField->B; + } + + + + + int + + + _Anonymous_e__Union + + + + _A_e__Struct + + + _B_e__Struct + + + + int + + + + + int + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Default.cs new file mode 100644 index 00000000..1d4b62fb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Default.cs @@ -0,0 +1,73 @@ +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct _MY_UNION + { + [FieldOffset(0)] + [NativeTypeName("long[2]")] + public fixed int AsArray[2]; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L4_C5")] + public _Anonymous_e__Struct Anonymous; + + public ref int First + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.First, 1)); + } + } + + public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.A, 1)); + } + } + + public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B + { + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.B, 1)); + } + } + + public partial struct _Anonymous_e__Struct + { + [NativeTypeName("long")] + public int First; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L9_C13")] + public _A_e__Struct A; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C13")] + public _B_e__Struct B; + + public partial struct _A_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + + public partial struct _B_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + } + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Default.xml new file mode 100644 index 00000000..f1bc3681 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Default.xml @@ -0,0 +1,57 @@ + + + + + + int + + + _Anonymous_e__Struct + + + ref int + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.First, 1)); + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.A, 1)); + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct + + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.B, 1)); + + + + + int + + + _Anonymous_e__Union + + + + _A_e__Struct + + + _B_e__Struct + + + + int + + + + + int + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Latest.cs new file mode 100644 index 00000000..0b542be9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Latest.cs @@ -0,0 +1,84 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct _MY_UNION + { + [FieldOffset(0)] + [NativeTypeName("long[2]")] + public _AsArray_e__FixedBuffer AsArray; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L4_C5")] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref int First + { + get + { + return ref Anonymous.First; + } + } + + [UnscopedRef] + public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A + { + get + { + return ref Anonymous.Anonymous.A; + } + } + + [UnscopedRef] + public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B + { + get + { + return ref Anonymous.Anonymous.B; + } + } + + public partial struct _Anonymous_e__Struct + { + [NativeTypeName("long")] + public int First; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L9_C13")] + public _A_e__Struct A; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C13")] + public _B_e__Struct B; + + public partial struct _A_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + + public partial struct _B_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + } + } + + [InlineArray(2)] + public partial struct _AsArray_e__FixedBuffer + { + public int e0; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Latest.xml new file mode 100644 index 00000000..4aab4c78 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Latest.xml @@ -0,0 +1,63 @@ + + + + + + int + + + _Anonymous_e__Struct + + + ref int + + return ref Anonymous.First; + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct + + return ref Anonymous.Anonymous.A; + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct + + return ref Anonymous.Anonymous.B; + + + + + int + + + _Anonymous_e__Union + + + + _A_e__Struct + + + _B_e__Struct + + + + int + + + + + int + + + + + + InlineArray(2) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Preview.cs new file mode 100644 index 00000000..0b542be9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Preview.cs @@ -0,0 +1,84 @@ +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace ClangSharp.Test +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct _MY_UNION + { + [FieldOffset(0)] + [NativeTypeName("long[2]")] + public _AsArray_e__FixedBuffer AsArray; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L4_C5")] + public _Anonymous_e__Struct Anonymous; + + [UnscopedRef] + public ref int First + { + get + { + return ref Anonymous.First; + } + } + + [UnscopedRef] + public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A + { + get + { + return ref Anonymous.Anonymous.A; + } + } + + [UnscopedRef] + public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B + { + get + { + return ref Anonymous.Anonymous.B; + } + } + + public partial struct _Anonymous_e__Struct + { + [NativeTypeName("long")] + public int First; + + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L7_C9")] + public _Anonymous_e__Union Anonymous; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L9_C13")] + public _A_e__Struct A; + + [FieldOffset(0)] + [NativeTypeName("__AnonymousRecord_ClangUnsavedFile_L14_C13")] + public _B_e__Struct B; + + public partial struct _A_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + + public partial struct _B_e__Struct + { + [NativeTypeName("long")] + public int Second; + } + } + } + + [InlineArray(2)] + public partial struct _AsArray_e__FixedBuffer + { + public int e0; + } + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Preview.xml new file mode 100644 index 00000000..4aab4c78 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/UnionDeclarationTest.UnionWithAnonStructWithAnonUnion.Windows.Preview.xml @@ -0,0 +1,63 @@ + + + + + + int + + + _Anonymous_e__Struct + + + ref int + + return ref Anonymous.First; + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct + + return ref Anonymous.Anonymous.A; + + + + ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct + + return ref Anonymous.Anonymous.B; + + + + + int + + + _Anonymous_e__Union + + + + _A_e__Struct + + + _B_e__Struct + + + + int + + + + + int + + + + + + InlineArray(2) + + int + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..abb7732f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Compatible.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..7e51277d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + double + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Default.cs new file mode 100644 index 00000000..abb7732f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Default.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Default.xml new file mode 100644 index 00000000..7e51277d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + double + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Latest.cs new file mode 100644 index 00000000..abb7732f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Latest.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Latest.xml new file mode 100644 index 00000000..7e51277d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + double + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Preview.cs new file mode 100644 index 00000000..abb7732f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Preview.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Preview.xml new file mode 100644 index 00000000..7e51277d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + double + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..abb7732f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Compatible.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..7e51277d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + double + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Default.cs new file mode 100644 index 00000000..abb7732f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Default.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Default.xml new file mode 100644 index 00000000..7e51277d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + double + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Latest.cs new file mode 100644 index 00000000..abb7732f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Latest.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Latest.xml new file mode 100644 index 00000000..7e51277d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + double + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Preview.cs new file mode 100644 index 00000000..abb7732f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Preview.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static double MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Preview.xml new file mode 100644 index 00000000..7e51277d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.double.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + double + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..9cbc2191 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Compatible.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static float MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..1ca4e4e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + float + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Default.cs new file mode 100644 index 00000000..9cbc2191 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Default.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static float MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Default.xml new file mode 100644 index 00000000..1ca4e4e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + float + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Latest.cs new file mode 100644 index 00000000..9cbc2191 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Latest.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static float MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Latest.xml new file mode 100644 index 00000000..1ca4e4e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + float + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Preview.cs new file mode 100644 index 00000000..9cbc2191 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Preview.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static float MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Preview.xml new file mode 100644 index 00000000..1ca4e4e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + float + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..9cbc2191 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Compatible.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static float MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..1ca4e4e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + float + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Default.cs new file mode 100644 index 00000000..9cbc2191 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Default.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static float MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Default.xml new file mode 100644 index 00000000..1ca4e4e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + float + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Latest.cs new file mode 100644 index 00000000..9cbc2191 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Latest.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static float MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Latest.xml new file mode 100644 index 00000000..1ca4e4e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + float + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Preview.cs new file mode 100644 index 00000000..9cbc2191 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Preview.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static float MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Preview.xml new file mode 100644 index 00000000..1ca4e4e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.float.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + float + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..1eed0575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Compatible.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static int MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..e6b59b13 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Default.cs new file mode 100644 index 00000000..1eed0575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Default.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static int MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Default.xml new file mode 100644 index 00000000..e6b59b13 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Latest.cs new file mode 100644 index 00000000..1eed0575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Latest.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static int MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Latest.xml new file mode 100644 index 00000000..e6b59b13 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Preview.cs new file mode 100644 index 00000000..1eed0575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Preview.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static int MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Preview.xml new file mode 100644 index 00000000..e6b59b13 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..1eed0575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Compatible.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static int MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..e6b59b13 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Default.cs new file mode 100644 index 00000000..1eed0575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Default.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static int MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Default.xml new file mode 100644 index 00000000..e6b59b13 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Latest.cs new file mode 100644 index 00000000..1eed0575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Latest.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static int MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Latest.xml new file mode 100644 index 00000000..e6b59b13 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Preview.cs new file mode 100644 index 00000000..1eed0575 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Preview.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static int MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Preview.xml new file mode 100644 index 00000000..e6b59b13 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.int.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..2882f6d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Compatible.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static short MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..65a24b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + short + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Default.cs new file mode 100644 index 00000000..2882f6d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Default.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static short MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Default.xml new file mode 100644 index 00000000..65a24b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + short + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Latest.cs new file mode 100644 index 00000000..2882f6d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Latest.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static short MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Latest.xml new file mode 100644 index 00000000..65a24b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + short + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Preview.cs new file mode 100644 index 00000000..2882f6d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Preview.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static short MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Preview.xml new file mode 100644 index 00000000..65a24b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + short + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..2882f6d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Compatible.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static short MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..65a24b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + short + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Default.cs new file mode 100644 index 00000000..2882f6d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Default.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static short MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Default.xml new file mode 100644 index 00000000..65a24b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + short + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Latest.cs new file mode 100644 index 00000000..2882f6d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Latest.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static short MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Latest.xml new file mode 100644 index 00000000..65a24b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + short + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Preview.cs new file mode 100644 index 00000000..2882f6d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Preview.cs @@ -0,0 +1,7 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + public static short MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Preview.xml new file mode 100644 index 00000000..65a24b02 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicTest.short.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + short + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.cs new file mode 100644 index 00000000..1d97ce2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("long long")] + public static long MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.xml new file mode 100644 index 00000000..670d7921 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + long + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.cs new file mode 100644 index 00000000..1d97ce2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("long long")] + public static long MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.xml new file mode 100644 index 00000000..670d7921 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + long + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.cs new file mode 100644 index 00000000..1d97ce2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("long long")] + public static long MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.xml new file mode 100644 index 00000000..670d7921 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + long + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.cs new file mode 100644 index 00000000..1d97ce2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("long long")] + public static long MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.xml new file mode 100644 index 00000000..670d7921 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + long + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.cs new file mode 100644 index 00000000..1d97ce2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("long long")] + public static long MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.xml new file mode 100644 index 00000000..670d7921 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + long + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.cs new file mode 100644 index 00000000..1d97ce2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("long long")] + public static long MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.xml new file mode 100644 index 00000000..670d7921 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + long + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.cs new file mode 100644 index 00000000..1d97ce2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("long long")] + public static long MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.xml new file mode 100644 index 00000000..670d7921 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + long + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.cs new file mode 100644 index 00000000..1d97ce2d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("long long")] + public static long MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.xml new file mode 100644 index 00000000..670d7921 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.long long.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + long + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.cs new file mode 100644 index 00000000..c9dd9173 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("signed char")] + public static sbyte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.xml new file mode 100644 index 00000000..d4a2019c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + sbyte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.cs new file mode 100644 index 00000000..c9dd9173 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("signed char")] + public static sbyte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.xml new file mode 100644 index 00000000..d4a2019c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + sbyte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.cs new file mode 100644 index 00000000..c9dd9173 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("signed char")] + public static sbyte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.xml new file mode 100644 index 00000000..d4a2019c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + sbyte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.cs new file mode 100644 index 00000000..c9dd9173 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("signed char")] + public static sbyte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.xml new file mode 100644 index 00000000..d4a2019c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + sbyte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.cs new file mode 100644 index 00000000..c9dd9173 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("signed char")] + public static sbyte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.xml new file mode 100644 index 00000000..d4a2019c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + sbyte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.cs new file mode 100644 index 00000000..c9dd9173 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("signed char")] + public static sbyte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.xml new file mode 100644 index 00000000..d4a2019c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + sbyte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.cs new file mode 100644 index 00000000..c9dd9173 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("signed char")] + public static sbyte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.xml new file mode 100644 index 00000000..d4a2019c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + sbyte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.cs new file mode 100644 index 00000000..c9dd9173 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("signed char")] + public static sbyte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.xml new file mode 100644 index 00000000..d4a2019c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.signed char.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + sbyte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs new file mode 100644 index 00000000..49105d39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned char")] + public static byte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml new file mode 100644 index 00000000..b153c852 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + byte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.cs new file mode 100644 index 00000000..49105d39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned char")] + public static byte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.xml new file mode 100644 index 00000000..b153c852 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + byte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.cs new file mode 100644 index 00000000..49105d39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned char")] + public static byte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.xml new file mode 100644 index 00000000..b153c852 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + byte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.cs new file mode 100644 index 00000000..49105d39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned char")] + public static byte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.xml new file mode 100644 index 00000000..b153c852 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + byte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs new file mode 100644 index 00000000..49105d39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned char")] + public static byte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml new file mode 100644 index 00000000..b153c852 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + byte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.cs new file mode 100644 index 00000000..49105d39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned char")] + public static byte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.xml new file mode 100644 index 00000000..b153c852 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + byte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.cs new file mode 100644 index 00000000..49105d39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned char")] + public static byte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.xml new file mode 100644 index 00000000..b153c852 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + byte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.cs new file mode 100644 index 00000000..49105d39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned char")] + public static byte MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.xml new file mode 100644 index 00000000..b153c852 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned char.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + byte + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs new file mode 100644 index 00000000..c85d6911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned int")] + public static uint MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml new file mode 100644 index 00000000..b6693fbe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + uint + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.cs new file mode 100644 index 00000000..c85d6911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned int")] + public static uint MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.xml new file mode 100644 index 00000000..b6693fbe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + uint + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.cs new file mode 100644 index 00000000..c85d6911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned int")] + public static uint MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.xml new file mode 100644 index 00000000..b6693fbe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + uint + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.cs new file mode 100644 index 00000000..c85d6911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned int")] + public static uint MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.xml new file mode 100644 index 00000000..b6693fbe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + uint + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs new file mode 100644 index 00000000..c85d6911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned int")] + public static uint MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml new file mode 100644 index 00000000..b6693fbe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + uint + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.cs new file mode 100644 index 00000000..c85d6911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned int")] + public static uint MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.xml new file mode 100644 index 00000000..b6693fbe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + uint + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.cs new file mode 100644 index 00000000..c85d6911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned int")] + public static uint MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.xml new file mode 100644 index 00000000..b6693fbe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + uint + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.cs new file mode 100644 index 00000000..c85d6911 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned int")] + public static uint MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.xml new file mode 100644 index 00000000..b6693fbe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned int.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + uint + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs new file mode 100644 index 00000000..4fec43f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned long long")] + public static ulong MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml new file mode 100644 index 00000000..140dcd7d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + ulong + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.cs new file mode 100644 index 00000000..4fec43f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned long long")] + public static ulong MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.xml new file mode 100644 index 00000000..140dcd7d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + ulong + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs new file mode 100644 index 00000000..4fec43f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned long long")] + public static ulong MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml new file mode 100644 index 00000000..140dcd7d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + ulong + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs new file mode 100644 index 00000000..4fec43f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned long long")] + public static ulong MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml new file mode 100644 index 00000000..140dcd7d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + ulong + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs new file mode 100644 index 00000000..4fec43f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned long long")] + public static ulong MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml new file mode 100644 index 00000000..140dcd7d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + ulong + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.cs new file mode 100644 index 00000000..4fec43f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned long long")] + public static ulong MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.xml new file mode 100644 index 00000000..140dcd7d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + ulong + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs new file mode 100644 index 00000000..4fec43f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned long long")] + public static ulong MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml new file mode 100644 index 00000000..140dcd7d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + ulong + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs new file mode 100644 index 00000000..4fec43f3 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned long long")] + public static ulong MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml new file mode 100644 index 00000000..140dcd7d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned long long.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + ulong + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs new file mode 100644 index 00000000..bb595c05 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned short")] + public static ushort MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml new file mode 100644 index 00000000..978e4ee1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + ushort + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.cs new file mode 100644 index 00000000..bb595c05 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned short")] + public static ushort MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.xml new file mode 100644 index 00000000..978e4ee1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + ushort + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.cs new file mode 100644 index 00000000..bb595c05 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned short")] + public static ushort MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.xml new file mode 100644 index 00000000..978e4ee1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + ushort + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.cs new file mode 100644 index 00000000..bb595c05 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned short")] + public static ushort MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.xml new file mode 100644 index 00000000..978e4ee1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + ushort + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs new file mode 100644 index 00000000..bb595c05 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned short")] + public static ushort MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml new file mode 100644 index 00000000..978e4ee1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + ushort + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.cs new file mode 100644 index 00000000..bb595c05 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned short")] + public static ushort MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.xml new file mode 100644 index 00000000..978e4ee1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + ushort + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.cs new file mode 100644 index 00000000..bb595c05 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned short")] + public static ushort MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.xml new file mode 100644 index 00000000..978e4ee1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + ushort + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.cs new file mode 100644 index 00000000..bb595c05 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("unsigned short")] + public static ushort MyVariable = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.xml new file mode 100644 index 00000000..978e4ee1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.BasicWithNativeTypeNameTest.unsigned short.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + ushort + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Compatible.cs new file mode 100644 index 00000000..efb078dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)")] + public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Compatible.xml new file mode 100644 index 00000000..47c03e60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Compatible.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Default.cs new file mode 100644 index 00000000..efb078dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)")] + public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Default.xml new file mode 100644 index 00000000..47c03e60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Default.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Latest.cs new file mode 100644 index 00000000..efb078dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)")] + public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Latest.xml new file mode 100644 index 00000000..47c03e60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Latest.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Preview.cs new file mode 100644 index 00000000..efb078dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)")] + public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Preview.xml new file mode 100644 index 00000000..47c03e60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Unix.Preview.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Compatible.cs new file mode 100644 index 00000000..efb078dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)")] + public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Compatible.xml new file mode 100644 index 00000000..47c03e60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Compatible.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Default.cs new file mode 100644 index 00000000..efb078dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)")] + public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Default.xml new file mode 100644 index 00000000..47c03e60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Default.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Latest.cs new file mode 100644 index 00000000..efb078dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)")] + public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Latest.xml new file mode 100644 index 00000000..47c03e60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Latest.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Preview.cs new file mode 100644 index 00000000..efb078dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)")] + public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Preview.xml new file mode 100644 index 00000000..47c03e60 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.ConditionalDefineConstTest.Windows.Preview.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Compatible.cs new file mode 100644 index 00000000..0c794ba8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Compatible.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const GUID")] + public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Compatible.xml new file mode 100644 index 00000000..6d4ed67b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + Guid + + new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Default.cs new file mode 100644 index 00000000..0c794ba8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Default.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const GUID")] + public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Default.xml new file mode 100644 index 00000000..6d4ed67b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + Guid + + new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Latest.cs new file mode 100644 index 00000000..0c794ba8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Latest.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const GUID")] + public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Latest.xml new file mode 100644 index 00000000..6d4ed67b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + Guid + + new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Preview.cs new file mode 100644 index 00000000..0c794ba8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Preview.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const GUID")] + public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Preview.xml new file mode 100644 index 00000000..6d4ed67b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + Guid + + new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Compatible.cs new file mode 100644 index 00000000..0c794ba8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Compatible.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const GUID")] + public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Compatible.xml new file mode 100644 index 00000000..6d4ed67b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + Guid + + new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Default.cs new file mode 100644 index 00000000..0c794ba8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Default.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const GUID")] + public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Default.xml new file mode 100644 index 00000000..6d4ed67b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + Guid + + new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Latest.cs new file mode 100644 index 00000000..0c794ba8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Latest.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const GUID")] + public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Latest.xml new file mode 100644 index 00000000..6d4ed67b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + Guid + + new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Preview.cs new file mode 100644 index 00000000..0c794ba8 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Preview.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const GUID")] + public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Preview.xml new file mode 100644 index 00000000..6d4ed67b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.GuidMacroTest.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + Guid + + new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Compatible.cs new file mode 100644 index 00000000..65a3908b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.0")] + public const double MyMacro1 = 0.0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const double MyMacro2 = 0.0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Compatible.xml new file mode 100644 index 00000000..71689801 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + double + + 0.0 + + + + double + + 0.0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Default.cs new file mode 100644 index 00000000..65a3908b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.0")] + public const double MyMacro1 = 0.0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const double MyMacro2 = 0.0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Default.xml new file mode 100644 index 00000000..71689801 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + double + + 0.0 + + + + double + + 0.0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Latest.cs new file mode 100644 index 00000000..65a3908b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.0")] + public const double MyMacro1 = 0.0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const double MyMacro2 = 0.0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Latest.xml new file mode 100644 index 00000000..71689801 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + double + + 0.0 + + + + double + + 0.0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Preview.cs new file mode 100644 index 00000000..65a3908b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.0")] + public const double MyMacro1 = 0.0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const double MyMacro2 = 0.0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Preview.xml new file mode 100644 index 00000000..71689801 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + double + + 0.0 + + + + double + + 0.0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Compatible.cs new file mode 100644 index 00000000..65a3908b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.0")] + public const double MyMacro1 = 0.0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const double MyMacro2 = 0.0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Compatible.xml new file mode 100644 index 00000000..71689801 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + double + + 0.0 + + + + double + + 0.0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Default.cs new file mode 100644 index 00000000..65a3908b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.0")] + public const double MyMacro1 = 0.0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const double MyMacro2 = 0.0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Default.xml new file mode 100644 index 00000000..71689801 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + double + + 0.0 + + + + double + + 0.0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Latest.cs new file mode 100644 index 00000000..65a3908b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.0")] + public const double MyMacro1 = 0.0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const double MyMacro2 = 0.0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Latest.xml new file mode 100644 index 00000000..71689801 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + double + + 0.0 + + + + double + + 0.0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Preview.cs new file mode 100644 index 00000000..65a3908b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.0")] + public const double MyMacro1 = 0.0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const double MyMacro2 = 0.0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Preview.xml new file mode 100644 index 00000000..71689801 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.0.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + double + + 0.0 + + + + double + + 0.0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Compatible.cs new file mode 100644 index 00000000..43dd9231 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0")] + public const int MyMacro1 = 0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const int MyMacro2 = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Compatible.xml new file mode 100644 index 00000000..141c0496 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + int + + 0 + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Default.cs new file mode 100644 index 00000000..43dd9231 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0")] + public const int MyMacro1 = 0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const int MyMacro2 = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Default.xml new file mode 100644 index 00000000..141c0496 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + int + + 0 + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Latest.cs new file mode 100644 index 00000000..43dd9231 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0")] + public const int MyMacro1 = 0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const int MyMacro2 = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Latest.xml new file mode 100644 index 00000000..141c0496 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + int + + 0 + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Preview.cs new file mode 100644 index 00000000..43dd9231 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0")] + public const int MyMacro1 = 0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const int MyMacro2 = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Preview.xml new file mode 100644 index 00000000..141c0496 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + int + + 0 + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Compatible.cs new file mode 100644 index 00000000..43dd9231 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0")] + public const int MyMacro1 = 0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const int MyMacro2 = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Compatible.xml new file mode 100644 index 00000000..141c0496 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + int + + 0 + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Default.cs new file mode 100644 index 00000000..43dd9231 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0")] + public const int MyMacro1 = 0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const int MyMacro2 = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Default.xml new file mode 100644 index 00000000..141c0496 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + int + + 0 + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Latest.cs new file mode 100644 index 00000000..43dd9231 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0")] + public const int MyMacro1 = 0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const int MyMacro2 = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Latest.xml new file mode 100644 index 00000000..141c0496 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + int + + 0 + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Preview.cs new file mode 100644 index 00000000..43dd9231 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0")] + public const int MyMacro1 = 0; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const int MyMacro2 = 0; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Preview.xml new file mode 100644 index 00000000..141c0496 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + int + + 0 + + + + int + + 0 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Compatible.cs new file mode 100644 index 00000000..dda65176 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.f")] + public const float MyMacro1 = 0.0f; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const float MyMacro2 = 0.0f; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Compatible.xml new file mode 100644 index 00000000..83ba30a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + float + + 0.0f + + + + float + + 0.0f + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Default.cs new file mode 100644 index 00000000..dda65176 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.f")] + public const float MyMacro1 = 0.0f; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const float MyMacro2 = 0.0f; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Default.xml new file mode 100644 index 00000000..83ba30a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + float + + 0.0f + + + + float + + 0.0f + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Latest.cs new file mode 100644 index 00000000..dda65176 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.f")] + public const float MyMacro1 = 0.0f; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const float MyMacro2 = 0.0f; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Latest.xml new file mode 100644 index 00000000..83ba30a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + float + + 0.0f + + + + float + + 0.0f + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Preview.cs new file mode 100644 index 00000000..dda65176 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.f")] + public const float MyMacro1 = 0.0f; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const float MyMacro2 = 0.0f; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Preview.xml new file mode 100644 index 00000000..83ba30a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + float + + 0.0f + + + + float + + 0.0f + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Compatible.cs new file mode 100644 index 00000000..dda65176 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.f")] + public const float MyMacro1 = 0.0f; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const float MyMacro2 = 0.0f; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Compatible.xml new file mode 100644 index 00000000..83ba30a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + float + + 0.0f + + + + float + + 0.0f + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Default.cs new file mode 100644 index 00000000..dda65176 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.f")] + public const float MyMacro1 = 0.0f; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const float MyMacro2 = 0.0f; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Default.xml new file mode 100644 index 00000000..83ba30a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + float + + 0.0f + + + + float + + 0.0f + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Latest.cs new file mode 100644 index 00000000..dda65176 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.f")] + public const float MyMacro1 = 0.0f; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const float MyMacro2 = 0.0f; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Latest.xml new file mode 100644 index 00000000..83ba30a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + float + + 0.0f + + + + float + + 0.0f + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Preview.cs new file mode 100644 index 00000000..dda65176 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0.f")] + public const float MyMacro1 = 0.0f; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const float MyMacro2 = 0.0f; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Preview.xml new file mode 100644 index 00000000..83ba30a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0.f.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + float + + 0.0f + + + + float + + 0.0f + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Compatible.cs new file mode 100644 index 00000000..98239144 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LL")] + public const long MyMacro1 = 0L; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const long MyMacro2 = 0L; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Compatible.xml new file mode 100644 index 00000000..8576fc59 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + long + + 0L + + + + long + + 0L + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Default.cs new file mode 100644 index 00000000..98239144 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LL")] + public const long MyMacro1 = 0L; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const long MyMacro2 = 0L; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Default.xml new file mode 100644 index 00000000..8576fc59 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + long + + 0L + + + + long + + 0L + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Latest.cs new file mode 100644 index 00000000..98239144 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LL")] + public const long MyMacro1 = 0L; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const long MyMacro2 = 0L; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Latest.xml new file mode 100644 index 00000000..8576fc59 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + long + + 0L + + + + long + + 0L + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Preview.cs new file mode 100644 index 00000000..98239144 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LL")] + public const long MyMacro1 = 0L; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const long MyMacro2 = 0L; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Preview.xml new file mode 100644 index 00000000..8576fc59 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + long + + 0L + + + + long + + 0L + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Compatible.cs new file mode 100644 index 00000000..98239144 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LL")] + public const long MyMacro1 = 0L; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const long MyMacro2 = 0L; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Compatible.xml new file mode 100644 index 00000000..8576fc59 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + long + + 0L + + + + long + + 0L + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Default.cs new file mode 100644 index 00000000..98239144 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LL")] + public const long MyMacro1 = 0L; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const long MyMacro2 = 0L; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Default.xml new file mode 100644 index 00000000..8576fc59 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + long + + 0L + + + + long + + 0L + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Latest.cs new file mode 100644 index 00000000..98239144 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LL")] + public const long MyMacro1 = 0L; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const long MyMacro2 = 0L; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Latest.xml new file mode 100644 index 00000000..8576fc59 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + long + + 0L + + + + long + + 0L + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Preview.cs new file mode 100644 index 00000000..98239144 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LL")] + public const long MyMacro1 = 0L; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const long MyMacro2 = 0L; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Preview.xml new file mode 100644 index 00000000..8576fc59 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LL.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + long + + 0L + + + + long + + 0L + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Compatible.cs new file mode 100644 index 00000000..dde5c436 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LLU")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Compatible.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Default.cs new file mode 100644 index 00000000..dde5c436 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LLU")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Default.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Latest.cs new file mode 100644 index 00000000..dde5c436 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LLU")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Latest.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Preview.cs new file mode 100644 index 00000000..dde5c436 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LLU")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Preview.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Compatible.cs new file mode 100644 index 00000000..dde5c436 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LLU")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Compatible.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Default.cs new file mode 100644 index 00000000..dde5c436 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LLU")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Default.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Latest.cs new file mode 100644 index 00000000..dde5c436 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LLU")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Latest.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Preview.cs new file mode 100644 index 00000000..dde5c436 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0LLU")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Preview.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0LLU.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Compatible.cs new file mode 100644 index 00000000..781a5d4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0U")] + public const uint MyMacro1 = 0U; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const uint MyMacro2 = 0U; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Compatible.xml new file mode 100644 index 00000000..4dc3adbb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + uint + + 0U + + + + uint + + 0U + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Default.cs new file mode 100644 index 00000000..781a5d4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0U")] + public const uint MyMacro1 = 0U; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const uint MyMacro2 = 0U; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Default.xml new file mode 100644 index 00000000..4dc3adbb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + uint + + 0U + + + + uint + + 0U + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Latest.cs new file mode 100644 index 00000000..781a5d4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0U")] + public const uint MyMacro1 = 0U; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const uint MyMacro2 = 0U; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Latest.xml new file mode 100644 index 00000000..4dc3adbb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + uint + + 0U + + + + uint + + 0U + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Preview.cs new file mode 100644 index 00000000..781a5d4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0U")] + public const uint MyMacro1 = 0U; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const uint MyMacro2 = 0U; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Preview.xml new file mode 100644 index 00000000..4dc3adbb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + uint + + 0U + + + + uint + + 0U + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Compatible.cs new file mode 100644 index 00000000..781a5d4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0U")] + public const uint MyMacro1 = 0U; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const uint MyMacro2 = 0U; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Compatible.xml new file mode 100644 index 00000000..4dc3adbb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + uint + + 0U + + + + uint + + 0U + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Default.cs new file mode 100644 index 00000000..781a5d4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0U")] + public const uint MyMacro1 = 0U; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const uint MyMacro2 = 0U; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Default.xml new file mode 100644 index 00000000..4dc3adbb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + uint + + 0U + + + + uint + + 0U + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Latest.cs new file mode 100644 index 00000000..781a5d4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0U")] + public const uint MyMacro1 = 0U; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const uint MyMacro2 = 0U; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Latest.xml new file mode 100644 index 00000000..4dc3adbb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + uint + + 0U + + + + uint + + 0U + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Preview.cs new file mode 100644 index 00000000..781a5d4b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0U")] + public const uint MyMacro1 = 0U; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const uint MyMacro2 = 0U; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Preview.xml new file mode 100644 index 00000000..4dc3adbb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0U.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + uint + + 0U + + + + uint + + 0U + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Compatible.cs new file mode 100644 index 00000000..b290d6b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0ULL")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Compatible.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Default.cs new file mode 100644 index 00000000..b290d6b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0ULL")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Default.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Default.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Latest.cs new file mode 100644 index 00000000..b290d6b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0ULL")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Latest.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Latest.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Preview.cs new file mode 100644 index 00000000..b290d6b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0ULL")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Preview.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Unix.Preview.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Compatible.cs new file mode 100644 index 00000000..b290d6b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0ULL")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Compatible.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Compatible.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Default.cs new file mode 100644 index 00000000..b290d6b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0ULL")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Default.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Default.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Latest.cs new file mode 100644 index 00000000..b290d6b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0ULL")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Latest.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Latest.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Preview.cs new file mode 100644 index 00000000..b290d6b4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0ULL")] + public const ulong MyMacro1 = 0UL; + + [NativeTypeName("#define MyMacro2 MyMacro1")] + public const ulong MyMacro2 = 0UL; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Preview.xml new file mode 100644 index 00000000..2bf4912c --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MacroTest.0ULL.Windows.Preview.xml @@ -0,0 +1,19 @@ + + + + + + ulong + + 0UL + + + + ulong + + 0UL + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Compatible.cs new file mode 100644 index 00000000..873d9a3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Compatible.cs @@ -0,0 +1,20 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const int[2][2]")] + public static readonly int[][] MyArray = new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Compatible.xml new file mode 100644 index 00000000..31969fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Compatible.xml @@ -0,0 +1,25 @@ + + + + + + int[][] + + new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Default.cs new file mode 100644 index 00000000..873d9a3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Default.cs @@ -0,0 +1,20 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const int[2][2]")] + public static readonly int[][] MyArray = new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Default.xml new file mode 100644 index 00000000..31969fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Default.xml @@ -0,0 +1,25 @@ + + + + + + int[][] + + new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Latest.cs new file mode 100644 index 00000000..873d9a3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Latest.cs @@ -0,0 +1,20 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const int[2][2]")] + public static readonly int[][] MyArray = new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Latest.xml new file mode 100644 index 00000000..31969fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Latest.xml @@ -0,0 +1,25 @@ + + + + + + int[][] + + new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Preview.cs new file mode 100644 index 00000000..873d9a3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Preview.cs @@ -0,0 +1,20 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const int[2][2]")] + public static readonly int[][] MyArray = new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Preview.xml new file mode 100644 index 00000000..31969fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Unix.Preview.xml @@ -0,0 +1,25 @@ + + + + + + int[][] + + new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Compatible.cs new file mode 100644 index 00000000..873d9a3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Compatible.cs @@ -0,0 +1,20 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const int[2][2]")] + public static readonly int[][] MyArray = new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Compatible.xml new file mode 100644 index 00000000..31969fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Compatible.xml @@ -0,0 +1,25 @@ + + + + + + int[][] + + new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Default.cs new file mode 100644 index 00000000..873d9a3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Default.cs @@ -0,0 +1,20 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const int[2][2]")] + public static readonly int[][] MyArray = new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Default.xml new file mode 100644 index 00000000..31969fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Default.xml @@ -0,0 +1,25 @@ + + + + + + int[][] + + new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Latest.cs new file mode 100644 index 00000000..873d9a3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Latest.cs @@ -0,0 +1,20 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const int[2][2]")] + public static readonly int[][] MyArray = new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Latest.xml new file mode 100644 index 00000000..31969fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Latest.xml @@ -0,0 +1,25 @@ + + + + + + int[][] + + new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Preview.cs new file mode 100644 index 00000000..873d9a3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Preview.cs @@ -0,0 +1,20 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const int[2][2]")] + public static readonly int[][] MyArray = new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Preview.xml new file mode 100644 index 00000000..31969fe5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultidimensionlArrayTest.Windows.Preview.xml @@ -0,0 +1,25 @@ + + + + + + int[][] + + new int[2][] + { + new int[2] + { + 0, + 1, + }, + new int[2] + { + 2, + 3, + }, + } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Compatible.cs new file mode 100644 index 00000000..eda40d0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0 + \\\n1")] + public const int MyMacro1 = 0 + 1; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Compatible.xml new file mode 100644 index 00000000..46bc242b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Default.cs new file mode 100644 index 00000000..eda40d0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0 + \\\n1")] + public const int MyMacro1 = 0 + 1; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Default.xml new file mode 100644 index 00000000..46bc242b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Latest.cs new file mode 100644 index 00000000..eda40d0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0 + \\\n1")] + public const int MyMacro1 = 0 + 1; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Latest.xml new file mode 100644 index 00000000..46bc242b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Preview.cs new file mode 100644 index 00000000..eda40d0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0 + \\\n1")] + public const int MyMacro1 = 0 + 1; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Preview.xml new file mode 100644 index 00000000..46bc242b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Compatible.cs new file mode 100644 index 00000000..eda40d0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0 + \\\n1")] + public const int MyMacro1 = 0 + 1; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Compatible.xml new file mode 100644 index 00000000..46bc242b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Default.cs new file mode 100644 index 00000000..eda40d0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0 + \\\n1")] + public const int MyMacro1 = 0 + 1; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Default.xml new file mode 100644 index 00000000..46bc242b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Latest.cs new file mode 100644 index 00000000..eda40d0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0 + \\\n1")] + public const int MyMacro1 = 0 + 1; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Latest.xml new file mode 100644 index 00000000..46bc242b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Preview.cs new file mode 100644 index 00000000..eda40d0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 0 + \\\n1")] + public const int MyMacro1 = 0 + 1; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Preview.xml new file mode 100644 index 00000000..46bc242b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.MultilineMacroTest.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + int + + 0 + 1 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Unix.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.double.Windows.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Unix.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.float.Windows.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Unix.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.int.Windows.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Unix.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Compatible.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Compatible.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Default.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Default.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Latest.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Latest.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Preview.cs new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.NoInitializerTest.short.Windows.Preview.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Compatible.cs new file mode 100644 index 00000000..caf671e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Compatible.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Compatible.xml new file mode 100644 index 00000000..9a7c592b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Compatible.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + byte[] + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Default.cs new file mode 100644 index 00000000..caf671e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Default.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Default.xml new file mode 100644 index 00000000..9a7c592b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Default.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + byte[] + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Latest.cs new file mode 100644 index 00000000..1d163657 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Latest.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => "Test\0\\\r\n\t\""u8; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = "Test\0\\\r\n\t\""u8.ToArray(); + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => "Test\0\\\r\n\t\""u8; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Latest.xml new file mode 100644 index 00000000..d1e476bc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Latest.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + byte[] + + "Test\0\\\r\n\t\""u8.ToArray() + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Preview.cs new file mode 100644 index 00000000..1d163657 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Preview.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => "Test\0\\\r\n\t\""u8; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = "Test\0\\\r\n\t\""u8.ToArray(); + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => "Test\0\\\r\n\t\""u8; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Preview.xml new file mode 100644 index 00000000..d1e476bc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Unix.Preview.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + byte[] + + "Test\0\\\r\n\t\""u8.ToArray() + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Compatible.cs new file mode 100644 index 00000000..caf671e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Compatible.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Compatible.xml new file mode 100644 index 00000000..9a7c592b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Compatible.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + byte[] + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Default.cs new file mode 100644 index 00000000..caf671e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Default.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Default.xml new file mode 100644 index 00000000..9a7c592b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Default.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + byte[] + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Latest.cs new file mode 100644 index 00000000..1d163657 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Latest.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => "Test\0\\\r\n\t\""u8; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = "Test\0\\\r\n\t\""u8.ToArray(); + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => "Test\0\\\r\n\t\""u8; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Latest.xml new file mode 100644 index 00000000..d1e476bc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Latest.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + byte[] + + "Test\0\\\r\n\t\""u8.ToArray() + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Preview.cs new file mode 100644 index 00000000..1d163657 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Preview.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => "Test\0\\\r\n\t\""u8; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = "Test\0\\\r\n\t\""u8.ToArray(); + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => "Test\0\\\r\n\t\""u8; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Preview.xml new file mode 100644 index 00000000..d1e476bc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralConstTest.Windows.Preview.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + byte[] + + "Test\0\\\r\n\t\""u8.ToArray() + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Compatible.cs new file mode 100644 index 00000000..caf671e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Compatible.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Compatible.xml new file mode 100644 index 00000000..9a7c592b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Compatible.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + byte[] + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Default.cs new file mode 100644 index 00000000..caf671e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Default.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Default.xml new file mode 100644 index 00000000..9a7c592b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Default.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + byte[] + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Latest.cs new file mode 100644 index 00000000..1d163657 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Latest.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => "Test\0\\\r\n\t\""u8; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = "Test\0\\\r\n\t\""u8.ToArray(); + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => "Test\0\\\r\n\t\""u8; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Latest.xml new file mode 100644 index 00000000..d1e476bc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Latest.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + byte[] + + "Test\0\\\r\n\t\""u8.ToArray() + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Preview.cs new file mode 100644 index 00000000..1d163657 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Preview.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => "Test\0\\\r\n\t\""u8; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = "Test\0\\\r\n\t\""u8.ToArray(); + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => "Test\0\\\r\n\t\""u8; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Preview.xml new file mode 100644 index 00000000..d1e476bc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Unix.Preview.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + byte[] + + "Test\0\\\r\n\t\""u8.ToArray() + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Compatible.cs new file mode 100644 index 00000000..caf671e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Compatible.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Compatible.xml new file mode 100644 index 00000000..9a7c592b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Compatible.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + byte[] + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Default.cs new file mode 100644 index 00000000..caf671e4 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Default.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Default.xml new file mode 100644 index 00000000..9a7c592b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Default.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + byte[] + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Latest.cs new file mode 100644 index 00000000..1d163657 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Latest.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => "Test\0\\\r\n\t\""u8; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = "Test\0\\\r\n\t\""u8.ToArray(); + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => "Test\0\\\r\n\t\""u8; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Latest.xml new file mode 100644 index 00000000..d1e476bc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Latest.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + byte[] + + "Test\0\\\r\n\t\""u8.ToArray() + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Preview.cs new file mode 100644 index 00000000..1d163657 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Preview.cs @@ -0,0 +1,16 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const char[11]")] + public static ReadOnlySpan MyConst1 => "Test\0\\\r\n\t\""u8; + + [NativeTypeName("const char *")] + public static byte[] MyConst2 = "Test\0\\\r\n\t\""u8.ToArray(); + + [NativeTypeName("const char *const")] + public static ReadOnlySpan MyConst3 => "Test\0\\\r\n\t\""u8; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Preview.xml new file mode 100644 index 00000000..d1e476bc --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.StringLiteralStaticConstTest.Windows.Preview.xml @@ -0,0 +1,25 @@ + + + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + byte[] + + "Test\0\\\r\n\t\""u8.ToArray() + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Compatible.cs new file mode 100644 index 00000000..c3a28b0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 (long)0x80000000L")] + public const int MyMacro1 = unchecked((int)(0x80000000)); + + [NativeTypeName("#define MyMacro2 (int)0x80000000")] + public const int MyMacro2 = unchecked((int)(0x80000000)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Compatible.xml new file mode 100644 index 00000000..bf1857dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Compatible.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + (int)(0x80000000) + + + + + + int + + + + (int)(0x80000000) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Default.cs new file mode 100644 index 00000000..c3a28b0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 (long)0x80000000L")] + public const int MyMacro1 = unchecked((int)(0x80000000)); + + [NativeTypeName("#define MyMacro2 (int)0x80000000")] + public const int MyMacro2 = unchecked((int)(0x80000000)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Default.xml new file mode 100644 index 00000000..bf1857dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Default.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + (int)(0x80000000) + + + + + + int + + + + (int)(0x80000000) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Latest.cs new file mode 100644 index 00000000..c3a28b0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 (long)0x80000000L")] + public const int MyMacro1 = unchecked((int)(0x80000000)); + + [NativeTypeName("#define MyMacro2 (int)0x80000000")] + public const int MyMacro2 = unchecked((int)(0x80000000)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Latest.xml new file mode 100644 index 00000000..bf1857dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Latest.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + (int)(0x80000000) + + + + + + int + + + + (int)(0x80000000) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Preview.cs new file mode 100644 index 00000000..c3a28b0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 (long)0x80000000L")] + public const int MyMacro1 = unchecked((int)(0x80000000)); + + [NativeTypeName("#define MyMacro2 (int)0x80000000")] + public const int MyMacro2 = unchecked((int)(0x80000000)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Preview.xml new file mode 100644 index 00000000..bf1857dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Unix.Preview.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + (int)(0x80000000) + + + + + + int + + + + (int)(0x80000000) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Compatible.cs new file mode 100644 index 00000000..c3a28b0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Compatible.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 (long)0x80000000L")] + public const int MyMacro1 = unchecked((int)(0x80000000)); + + [NativeTypeName("#define MyMacro2 (int)0x80000000")] + public const int MyMacro2 = unchecked((int)(0x80000000)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Compatible.xml new file mode 100644 index 00000000..bf1857dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Compatible.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + (int)(0x80000000) + + + + + + int + + + + (int)(0x80000000) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Default.cs new file mode 100644 index 00000000..c3a28b0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Default.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 (long)0x80000000L")] + public const int MyMacro1 = unchecked((int)(0x80000000)); + + [NativeTypeName("#define MyMacro2 (int)0x80000000")] + public const int MyMacro2 = unchecked((int)(0x80000000)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Default.xml new file mode 100644 index 00000000..bf1857dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Default.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + (int)(0x80000000) + + + + + + int + + + + (int)(0x80000000) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Latest.cs new file mode 100644 index 00000000..c3a28b0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Latest.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 (long)0x80000000L")] + public const int MyMacro1 = unchecked((int)(0x80000000)); + + [NativeTypeName("#define MyMacro2 (int)0x80000000")] + public const int MyMacro2 = unchecked((int)(0x80000000)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Latest.xml new file mode 100644 index 00000000..bf1857dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Latest.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + (int)(0x80000000) + + + + + + int + + + + (int)(0x80000000) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Preview.cs new file mode 100644 index 00000000..c3a28b0d --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Preview.cs @@ -0,0 +1,11 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 (long)0x80000000L")] + public const int MyMacro1 = unchecked((int)(0x80000000)); + + [NativeTypeName("#define MyMacro2 (int)0x80000000")] + public const int MyMacro2 = unchecked((int)(0x80000000)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Preview.xml new file mode 100644 index 00000000..bf1857dd --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest.Windows.Preview.xml @@ -0,0 +1,27 @@ + + + + + + int + + + + (int)(0x80000000) + + + + + + int + + + + (int)(0x80000000) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Compatible.cs new file mode 100644 index 00000000..4ad3a2d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro3 MyMacro2(3)")] + public const int MyMacro3 = unchecked((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Compatible.xml new file mode 100644 index 00000000..be3b578b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Compatible.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Default.cs new file mode 100644 index 00000000..4ad3a2d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro3 MyMacro2(3)")] + public const int MyMacro3 = unchecked((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Default.xml new file mode 100644 index 00000000..be3b578b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Default.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Latest.cs new file mode 100644 index 00000000..4ad3a2d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro3 MyMacro2(3)")] + public const int MyMacro3 = unchecked((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Latest.xml new file mode 100644 index 00000000..be3b578b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Latest.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Preview.cs new file mode 100644 index 00000000..4ad3a2d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro3 MyMacro2(3)")] + public const int MyMacro3 = unchecked((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Preview.xml new file mode 100644 index 00000000..be3b578b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Unix.Preview.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Compatible.cs new file mode 100644 index 00000000..4ad3a2d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro3 MyMacro2(3)")] + public const int MyMacro3 = unchecked((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Compatible.xml new file mode 100644 index 00000000..be3b578b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Compatible.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Default.cs new file mode 100644 index 00000000..4ad3a2d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro3 MyMacro2(3)")] + public const int MyMacro3 = unchecked((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Default.xml new file mode 100644 index 00000000..be3b578b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Default.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Latest.cs new file mode 100644 index 00000000..4ad3a2d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro3 MyMacro2(3)")] + public const int MyMacro3 = unchecked((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Latest.xml new file mode 100644 index 00000000..be3b578b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Latest.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Preview.cs new file mode 100644 index 00000000..4ad3a2d9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro3 MyMacro2(3)")] + public const int MyMacro3 = unchecked((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Preview.xml new file mode 100644 index 00000000..be3b578b --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedConversionMacroTest2.Windows.Preview.xml @@ -0,0 +1,15 @@ + + + + + + int + + + ((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Compatible.cs new file mode 100644 index 00000000..162e9544 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 unsigned(-1)")] + public const uint MyMacro1 = unchecked((uint)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Compatible.xml new file mode 100644 index 00000000..7d122724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + uint + + + + (uint)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Default.cs new file mode 100644 index 00000000..162e9544 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 unsigned(-1)")] + public const uint MyMacro1 = unchecked((uint)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Default.xml new file mode 100644 index 00000000..7d122724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + uint + + + + (uint)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Latest.cs new file mode 100644 index 00000000..162e9544 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 unsigned(-1)")] + public const uint MyMacro1 = unchecked((uint)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Latest.xml new file mode 100644 index 00000000..7d122724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + uint + + + + (uint)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Preview.cs new file mode 100644 index 00000000..162e9544 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 unsigned(-1)")] + public const uint MyMacro1 = unchecked((uint)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Preview.xml new file mode 100644 index 00000000..7d122724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + uint + + + + (uint)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Compatible.cs new file mode 100644 index 00000000..162e9544 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 unsigned(-1)")] + public const uint MyMacro1 = unchecked((uint)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Compatible.xml new file mode 100644 index 00000000..7d122724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + uint + + + + (uint)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Default.cs new file mode 100644 index 00000000..162e9544 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 unsigned(-1)")] + public const uint MyMacro1 = unchecked((uint)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Default.xml new file mode 100644 index 00000000..7d122724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + uint + + + + (uint)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Latest.cs new file mode 100644 index 00000000..162e9544 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 unsigned(-1)")] + public const uint MyMacro1 = unchecked((uint)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Latest.xml new file mode 100644 index 00000000..7d122724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + uint + + + + (uint)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Preview.cs new file mode 100644 index 00000000..162e9544 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 unsigned(-1)")] + public const uint MyMacro1 = unchecked((uint)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Preview.xml new file mode 100644 index 00000000..7d122724 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedFunctionLikeCastMacroTest.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + uint + + + + (uint)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Compatible.cs new file mode 100644 index 00000000..b8bdbc94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 ((int*) -1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Compatible.xml new file mode 100644 index 00000000..49c946e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Compatible.xml @@ -0,0 +1,15 @@ + + + + + + int* + + + ((int*)(-1)) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Default.cs new file mode 100644 index 00000000..b8bdbc94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 ((int*) -1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Default.xml new file mode 100644 index 00000000..49c946e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Default.xml @@ -0,0 +1,15 @@ + + + + + + int* + + + ((int*)(-1)) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Latest.cs new file mode 100644 index 00000000..b8bdbc94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 ((int*) -1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Latest.xml new file mode 100644 index 00000000..49c946e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Latest.xml @@ -0,0 +1,15 @@ + + + + + + int* + + + ((int*)(-1)) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Preview.cs new file mode 100644 index 00000000..b8bdbc94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 ((int*) -1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Preview.xml new file mode 100644 index 00000000..49c946e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Unix.Preview.xml @@ -0,0 +1,15 @@ + + + + + + int* + + + ((int*)(-1)) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Compatible.cs new file mode 100644 index 00000000..b8bdbc94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 ((int*) -1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Compatible.xml new file mode 100644 index 00000000..49c946e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Compatible.xml @@ -0,0 +1,15 @@ + + + + + + int* + + + ((int*)(-1)) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Default.cs new file mode 100644 index 00000000..b8bdbc94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 ((int*) -1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Default.xml new file mode 100644 index 00000000..49c946e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Default.xml @@ -0,0 +1,15 @@ + + + + + + int* + + + ((int*)(-1)) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Latest.cs new file mode 100644 index 00000000..b8bdbc94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 ((int*) -1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Latest.xml new file mode 100644 index 00000000..49c946e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Latest.xml @@ -0,0 +1,15 @@ + + + + + + int* + + + ((int*)(-1)) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Preview.cs new file mode 100644 index 00000000..b8bdbc94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 ((int*) -1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Preview.xml new file mode 100644 index 00000000..49c946e5 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedPointerMacroTest.Windows.Preview.xml @@ -0,0 +1,15 @@ + + + + + + int* + + + ((int*)(-1)) + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Compatible.cs new file mode 100644 index 00000000..fd4744a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 reinterpret_cast(-1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Compatible.xml new file mode 100644 index 00000000..ea4bbf5e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int* + + + + (int*)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Default.cs new file mode 100644 index 00000000..fd4744a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 reinterpret_cast(-1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Default.xml new file mode 100644 index 00000000..ea4bbf5e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Default.xml @@ -0,0 +1,17 @@ + + + + + + int* + + + + (int*)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Latest.cs new file mode 100644 index 00000000..fd4744a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 reinterpret_cast(-1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Latest.xml new file mode 100644 index 00000000..ea4bbf5e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int* + + + + (int*)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Preview.cs new file mode 100644 index 00000000..fd4744a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 reinterpret_cast(-1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Preview.xml new file mode 100644 index 00000000..ea4bbf5e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Unix.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int* + + + + (int*)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Compatible.cs new file mode 100644 index 00000000..fd4744a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 reinterpret_cast(-1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Compatible.xml new file mode 100644 index 00000000..ea4bbf5e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Compatible.xml @@ -0,0 +1,17 @@ + + + + + + int* + + + + (int*)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Default.cs new file mode 100644 index 00000000..fd4744a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 reinterpret_cast(-1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Default.xml new file mode 100644 index 00000000..ea4bbf5e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Default.xml @@ -0,0 +1,17 @@ + + + + + + int* + + + + (int*)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Latest.cs new file mode 100644 index 00000000..fd4744a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 reinterpret_cast(-1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Latest.xml new file mode 100644 index 00000000..ea4bbf5e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Latest.xml @@ -0,0 +1,17 @@ + + + + + + int* + + + + (int*)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Preview.cs new file mode 100644 index 00000000..fd4744a9 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static unsafe partial class Methods + { + [NativeTypeName("#define Macro1 reinterpret_cast(-1)")] + public static readonly int* Macro1 = unchecked((int*)(-1)); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Preview.xml new file mode 100644 index 00000000..ea4bbf5e --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.UncheckedReinterpretCastMacroTest.Windows.Preview.xml @@ -0,0 +1,17 @@ + + + + + + int* + + + + (int*)(-1) + + + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Compatible.cs new file mode 100644 index 00000000..3ada1f94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 u\"Test\0\\\r\n\t\"\"")] + public const string MyMacro1 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Compatible.xml new file mode 100644 index 00000000..65bd8d43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Default.cs new file mode 100644 index 00000000..3ada1f94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 u\"Test\0\\\r\n\t\"\"")] + public const string MyMacro1 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Default.xml new file mode 100644 index 00000000..65bd8d43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Latest.cs new file mode 100644 index 00000000..3ada1f94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 u\"Test\0\\\r\n\t\"\"")] + public const string MyMacro1 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Latest.xml new file mode 100644 index 00000000..65bd8d43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Preview.cs new file mode 100644 index 00000000..3ada1f94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 u\"Test\0\\\r\n\t\"\"")] + public const string MyMacro1 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Preview.xml new file mode 100644 index 00000000..65bd8d43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Compatible.cs new file mode 100644 index 00000000..3ada1f94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Compatible.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 u\"Test\0\\\r\n\t\"\"")] + public const string MyMacro1 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Compatible.xml new file mode 100644 index 00000000..65bd8d43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Default.cs new file mode 100644 index 00000000..3ada1f94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Default.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 u\"Test\0\\\r\n\t\"\"")] + public const string MyMacro1 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Default.xml new file mode 100644 index 00000000..65bd8d43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Latest.cs new file mode 100644 index 00000000..3ada1f94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Latest.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 u\"Test\0\\\r\n\t\"\"")] + public const string MyMacro1 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Latest.xml new file mode 100644 index 00000000..65bd8d43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Preview.cs new file mode 100644 index 00000000..3ada1f94 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Preview.cs @@ -0,0 +1,8 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 u\"Test\0\\\r\n\t\"\"")] + public const string MyMacro1 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Preview.xml new file mode 100644 index 00000000..65bd8d43 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf16StringLiteralMacroTest.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Compatible.cs new file mode 100644 index 00000000..27335180 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Compatible.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 \"Test\0\\\r\n\t\"\"")] + public static ReadOnlySpan MyMacro1 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Compatible.xml new file mode 100644 index 00000000..2598c763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Default.cs new file mode 100644 index 00000000..27335180 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Default.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 \"Test\0\\\r\n\t\"\"")] + public static ReadOnlySpan MyMacro1 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Default.xml new file mode 100644 index 00000000..2598c763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Default.xml @@ -0,0 +1,13 @@ + + + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Latest.cs new file mode 100644 index 00000000..13809a18 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Latest.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 \"Test\0\\\r\n\t\"\"")] + public static ReadOnlySpan MyMacro1 => "Test\0\\\r\n\t\""u8; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Latest.xml new file mode 100644 index 00000000..98a62320 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Latest.xml @@ -0,0 +1,13 @@ + + + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Preview.cs new file mode 100644 index 00000000..13809a18 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Preview.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 \"Test\0\\\r\n\t\"\"")] + public static ReadOnlySpan MyMacro1 => "Test\0\\\r\n\t\""u8; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Preview.xml new file mode 100644 index 00000000..98a62320 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Unix.Preview.xml @@ -0,0 +1,13 @@ + + + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Compatible.cs new file mode 100644 index 00000000..27335180 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Compatible.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 \"Test\0\\\r\n\t\"\"")] + public static ReadOnlySpan MyMacro1 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Compatible.xml new file mode 100644 index 00000000..2598c763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Compatible.xml @@ -0,0 +1,13 @@ + + + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Default.cs new file mode 100644 index 00000000..27335180 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Default.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 \"Test\0\\\r\n\t\"\"")] + public static ReadOnlySpan MyMacro1 => new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Default.xml new file mode 100644 index 00000000..2598c763 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Default.xml @@ -0,0 +1,13 @@ + + + + + + ReadOnlySpan<byte> + + new byte[] { 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 } + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Latest.cs new file mode 100644 index 00000000..13809a18 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Latest.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 \"Test\0\\\r\n\t\"\"")] + public static ReadOnlySpan MyMacro1 => "Test\0\\\r\n\t\""u8; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Latest.xml new file mode 100644 index 00000000..98a62320 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Latest.xml @@ -0,0 +1,13 @@ + + + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Preview.cs new file mode 100644 index 00000000..13809a18 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Preview.cs @@ -0,0 +1,10 @@ +using System; + +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("#define MyMacro1 \"Test\0\\\r\n\t\"\"")] + public static ReadOnlySpan MyMacro1 => "Test\0\\\r\n\t\""u8; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Preview.xml new file mode 100644 index 00000000..98a62320 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.Utf8StringLiteralMacroTest.Windows.Preview.xml @@ -0,0 +1,13 @@ + + + + + + ReadOnlySpan<byte> + + "Test\0\\\r\n\t\""u8 + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Compatible.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Compatible.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Compatible.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Compatible.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Default.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Default.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Default.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Default.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Latest.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Latest.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Latest.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Latest.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Preview.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Preview.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Preview.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Unix.Preview.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Compatible.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Compatible.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Compatible.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Compatible.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Default.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Default.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Default.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Default.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Latest.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Latest.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Latest.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Latest.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Preview.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Preview.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Preview.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralConstTest.Windows.Preview.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Compatible.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Compatible.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Compatible.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Compatible.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Default.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Default.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Default.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Default.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Latest.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Latest.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Latest.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Latest.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Preview.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Preview.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Preview.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Unix.Preview.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Compatible.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Compatible.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Compatible.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Compatible.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Compatible.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Compatible.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Default.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Default.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Default.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Default.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Default.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Default.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Latest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Latest.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Latest.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Latest.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Latest.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Latest.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Preview.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Preview.cs new file mode 100644 index 00000000..41a1d254 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Preview.cs @@ -0,0 +1,14 @@ +namespace ClangSharp.Test +{ + public static partial class Methods + { + [NativeTypeName("const wchar_t[11]")] + public const string MyConst1 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *")] + public static string MyConst2 = "Test\0\\\r\n\t\""; + + [NativeTypeName("const wchar_t *const")] + public const string MyConst3 = "Test\0\\\r\n\t\""; + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Preview.xml b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Preview.xml new file mode 100644 index 00000000..c0f140cb --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baselines/VarDeclarationTest.WideStringLiteralStaticConstTest.Windows.Preview.xml @@ -0,0 +1,25 @@ + + + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + string + + "Test\0\\\r\n\t\"" + + + + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/CXXMethodDeclarationTest.cs deleted file mode 100644 index afc4704c..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,1063 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpCompatibleUnix_CXXMethodDeclarationTest : 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 ValidateGeneratedCSharpCompatibleUnixBindingsAsync(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 ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public int value; - - public int ToInt32() - { - return value; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8$MyTemplateDoWorkEv" : "_ZN10MyTemplateIiE6DoWorkEPi"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [NativeTypeName(""struct MyStruct : MyTemplate"")] - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern int* DoWork(MyStruct* pThis, int* value = null); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public void Dispose() - { - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - if (!Environment.Is64BitProcess) - { - entryPoint = "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - else - { - entryPoint = "?MyVoidMethod@MyStruct@@QEAAXXZ"; - } - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(MyStruct* pThis); - - public int MyInt32Method() - {{ - return 0; - }} - - public void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(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 ValidateGeneratedCSharpCompatibleUnixBindingsAsync(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 ValidateGeneratedCSharpCompatibleUnixBindingsAsync(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 ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@"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); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new IntPtr GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public IntPtr GetType1; - - [NativeTypeName(""int (int, int){nativeCallConv}"")] - public IntPtr GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new IntPtr GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public IntPtr GetType1; - - [NativeTypeName(""int (int, int){nativeCallConv}"")] - public IntPtr GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedCSharpCompatibleUnixBindingsAsync(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 ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(); - - public static int MyInt32Method() - {{ - return 0; - }} - - public static void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(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 ValidateGeneratedCSharpCompatibleUnixBindingsAsync(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 ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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(""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); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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(""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); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/DeprecatedToObsoleteTest.cs deleted file mode 100644 index 289cc350..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,521 +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; - -[Platform("unix")] -public sealed class CSharpCompatibleUnix_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - [Obsolete] - MyEnum_Value1, - [Obsolete(""This is obsolete."")] - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"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, - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable0 = 0; - - [Obsolete] - public static {expectedManagedType} MyVariable1 = 0; - - [Obsolete(""This is obsolete."")] - public static {expectedManagedType} MyVariable2 = 0; - - public static {expectedManagedType} MyVariable3 = 0; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @"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() - { - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@"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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @"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(); - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/EnumDeclarationTest.cs deleted file mode 100644 index f6a5c169..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/EnumDeclarationTest.cs +++ /dev/null @@ -1,610 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpCompatibleUnix_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - [NativeTypeName(""{nativeType}"")] - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum1 : int -{ - MyEnum1_Value1, - MyEnum1_Value2, - MyEnum1_Value3, -} MyEnum1; - -namespace Namespace1 -{ - namespace Namespace2 - { - typedef enum _MyEnum2 : int - { - MyEnum2_Value1, - MyEnum2_Value2, - MyEnum2_Value3, - } MyEnum2; - - typedef enum _MyEnum3 : int - { - MyEnum3_Value1, - MyEnum3_Value2, - MyEnum3_Value3, - } MyEnum3; - - typedef enum _MyEnum4 : int - { - MyEnum4_Value1, - MyEnum4_Value2, - MyEnum4_Value3, - } MyEnum4; - } -} -"; - - var expectedOutputContents = @"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, - } -} -"; - - var remappedNames = new Dictionary { ["_MyEnum1"] = "MyEnum1", ["Namespace1.Namespace2._MyEnum2"] = "MyEnum2", ["_MyEnum3"] = "MyEnum3", ["Namespace1::Namespace2::_MyEnum4"] = "MyEnum4" }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - [Flags] - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = 1, - } -} -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using System; -using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0 = (int)(MyEnum)(10), - MyEnum_Value1 = (int)(MyEnum)(MyEnum_Value0), - MyEnum_Value2 = ((int)(MyEnum)(10)) + MyEnum_Value1, - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @"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), - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = unchecked((int)(0x80000000)), - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, - } -} -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum1 : uint - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - 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 ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @"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; - } -} -"; - 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 ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index b7638e69..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,1795 +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; - -[Platform("unix")] -public sealed class CSharpCompatibleUnix_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* pData, int index) - { - return pData[index]; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(bool x, bool y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - break; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction() - { - } - - public static void MyFunction() - { - MyCalledFunction(); - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction(int x, int y) - { - } - - public static void MyFunction() - { - MyCalledFunction(0, 1); - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - return condition ? lhs : rhs; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - continue; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction([NativeTypeName(""const void *"")] void* input) - { - return input; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@"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); - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - int x = 0; - int y = 1, z = 2; - - return x + y + z; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - if (condition) - { - return lhs; - } - - return rhs; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction() - { - return null; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static double MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static float MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - return; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - return -1; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(int value) - { - return &value; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* value) - { - return *value; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static bool MyFunction(bool value) - { - return !value; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return value{opcode}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return {opcode}value; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index 0b969f31..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,412 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpCompatibleUnix_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyFunction(); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@"{expectedUsingStatement}using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeAttr ? $@"[NativeTypeName(""MyTemplate<{nativeType}>"")] " : "")}MyTemplate<{expectedManagedType}> myStruct); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTemplate"")] - public MyTemplate a; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport("""", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeNameAttr ? $@"[NativeTypeName(""{nativeType}"")] " : "")}{expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"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({expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() => Task.CompletedTask; - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionPointerDeclarationTest.cs deleted file mode 100644 index 277d111b..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,94 +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; - -[Platform("unix")] -public sealed class CSharpCompatibleUnix_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/StructDeclarationTest.cs deleted file mode 100644 index 49c6c171..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/StructDeclarationTest.cs +++ /dev/null @@ -1,2021 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpCompatibleUnix_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[]"")] - public fixed {expectedManagedType} x[1]; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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 o4_b22_1 - { - get - { - return (byte)((_bitfield2 >> 22) & 0x1u); - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b23_1 - { - get - { - return (int)(_bitfield2 << 8) >> 31; - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b24_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); - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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(""o4_b22_1"", offset: 22, length: 1)] - [NativeBitfield(""o4_b23_1"", offset: 23, length: 1)] - [NativeBitfield(""o4_b24_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 o4_b22_1 - { - get - { - return (byte)((_bitfield2 >> 22) & 0x1u); - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b23_1 - { - get - { - return (int)(_bitfield2 << 8) >> 31; - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b24_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); - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @"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(); - } -} -"; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public fixed {expectedManagedType} c[2 * 1 * 3 * 4]; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""MyBuffer"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - struct - {{ - {nativeType} value1; - - struct - {{ - {nativeType} value; - }}; - }}; - - union - {{ - {nativeType} value2; - }}; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} value; - }} - - public unsafe partial struct MyStruct - {{ - public {expectedManagedType} x; - - public {expectedManagedType} y; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Struct Anonymous; - - public ref {expectedManagedType} 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 {expectedManagedType} value1 - {{ - get - {{ - fixed (_Anonymous_e__Struct._Anonymous1_e__Struct* pField = &Anonymous.Anonymous1) - {{ - return ref pField->value1; - }} - }} - }} - - public ref {expectedManagedType} value - {{ - get - {{ - fixed (_Anonymous_e__Struct._Anonymous1_e__Struct._Anonymous_e__Struct* pField = &Anonymous.Anonymous1.Anonymous) - {{ - return ref pField->value; - }} - }} - }} - - public ref {expectedManagedType} 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 {expectedManagedType} 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 {expectedManagedType} 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(""{nativeType}[4]"")] - public fixed {expectedManagedType} buffer1[4]; - - [NativeTypeName(""MyUnion[4]"")] - public _buffer2_e__FixedBuffer buffer2; - - public partial struct _w_e__Struct - {{ - public {expectedManagedType} value; - }} - - public unsafe partial struct _Anonymous1_e__Struct - {{ - public {expectedManagedType} value1; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_e__Struct - {{ - public {expectedManagedType} value; - }} - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous2_e__Union - {{ - [FieldOffset(0)] - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"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._Anonymous_e__Struct* pField = &Anonymous.Anonymous) - { - return ref pField->w; - } - } - } - - public int o0_b0_16 - { - get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - public unsafe partial struct _Anonymous_e__Struct - { - public int z; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var usingStatement = "using System.Runtime.InteropServices;\n\n"; - var packing = " [StructLayout(LayoutKind.Sequential, Pack = 4)]\n"; - - if (!Environment.Is64BitProcess) - { - usingStatement = string.Empty; - packing = string.Empty; - } - - var expectedOutputContents = $@"{usingStatement}namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct1 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} - -{packing} public unsafe partial struct MyStruct2 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - [NativeTypeName(""example_t *"")] - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @"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; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct1A - { - public void MyMethod() - { - } - } - - [NativeTypeName(""struct MyStruct1B : MyStruct1A"")] - public partial struct MyStruct1B - { - public void MyMethod() - { - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"typedef int size_t; - -struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @"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]; - } - } - } - } - } -} -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/UnionDeclarationTest.cs deleted file mode 100644 index b61bebb1..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/UnionDeclarationTest.cs +++ /dev/null @@ -1,1584 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpCompatibleUnix_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ", Pack = 1" : ""; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit{expectedPack})] - 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 o4_b22_1 - {{ - get - {{ - return (byte)((_bitfield2 >> 22) & 0x1u); - }} - - set - {{ - _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22); - }} - }} - - [NativeTypeName(""int : 1"")] - public int o4_b23_1 - {{ - get - {{ - return (int)(_bitfield2 << 8) >> 31; - }} - - set - {{ - _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23); - }} - }} - - [NativeTypeName(""int : 1"")] - public int o4_b24_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{expectedPack})] - 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); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public fixed {expectedManagedType} c[2 * 1 * 3 * 4]; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""MyBuffer"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Union Anonymous; - - public ref {expectedManagedType} 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 {expectedManagedType} 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 {expectedManagedType} a; - - [FieldOffset(0)] - public MyStruct s; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[4]"")] - public fixed {expectedManagedType} buffer[4]; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - { - [FieldOffset(0)] - public int x; - - [FieldOffset(0)] - public int y; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] - public _Anonymous_e__Union Anonymous; - - public ref int z - { - get - { - fixed (_Anonymous_e__Union* pField = &Anonymous) - { - return ref pField->z; - } - } - } - - public ref int w - { - get - { - fixed (_Anonymous_e__Union._Anonymous_e__Union* pField = &Anonymous.Anonymous) - { - return ref pField->w; - } - } - } - - public int o0_b0_16 - { - get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int z; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int w; - - [FieldOffset(0)] - 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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public new int Equals; - - [FieldOffset(0)] - public int Dispose; - - [FieldOffset(0)] - public new int GetHashCode; - - [FieldOffset(0)] - public new int GetType; - - [FieldOffset(0)] - public new int MemberwiseClone; - - [FieldOffset(0)] - public new int ReferenceEquals; - - [FieldOffset(0)] - public new int ToString; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - [NativeTypeName(""example_t *"")] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [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_L7_C5"")] - public _Anonymous_e__Union Anonymous; - - public ref double a - { - get - { - fixed (_Anonymous_e__Union* pField = &Anonymous) - { - return ref pField->a; - } - } - } - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public double a; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - { - } -} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct _MY_UNION - {{ - [FieldOffset(0)] - [NativeTypeName(""long[2]"")] - public _AsArray_e__FixedBuffer AsArray; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L4_C5"")] - public _Anonymous_e__Struct Anonymous; - - public ref IntPtr First - {{ - get - {{ - fixed (_Anonymous_e__Struct* pField = &Anonymous) - {{ - return ref pField->First; - }} - }} - }} - - public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A - {{ - get - {{ - fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) - {{ - return ref pField->A; - }} - }} - }} - - public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B - {{ - get - {{ - fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) - {{ - return ref pField->B; - }} - }} - }} - - public unsafe partial struct _Anonymous_e__Struct - {{ - [NativeTypeName(""long"")] - public IntPtr First; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - {{ - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L9_C13"")] - public _A_e__Struct A; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C13"")] - public _B_e__Struct B; - - public partial struct _A_e__Struct - {{ - [NativeTypeName(""long"")] - public IntPtr Second; - }} - - public partial struct _B_e__Struct - {{ - [NativeTypeName(""long"")] - public IntPtr Second; - }} - }} - }} - - public partial struct _AsArray_e__FixedBuffer - {{ - public IntPtr e0; - public IntPtr e1; - - public unsafe ref IntPtr this[int index] - {{ - get - {{ - fixed (IntPtr* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/VarDeclarationTest.cs deleted file mode 100644 index a068c33f..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleUnix/VarDeclarationTest.cs +++ /dev/null @@ -1,401 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpCompatibleUnix_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""{nativeType}"")] - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const GUID"")] - public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); - }} -}} -"; - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 {nativeValue}"")] - public const {expectedManagedType} MyMacro1 = {expectedManagedValue}; - - [NativeTypeName(""#define MyMacro2 MyMacro1"")] - public const {expectedManagedType} MyMacro2 = {expectedManagedValue}; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 0 + \\\n1"")] - public const int MyMacro1 = 0 + 1; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 \""Test\0\\\r\n\t\""\"""")] - public static ReadOnlySpan MyMacro1 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 u\""Test\0\\\r\n\t\""\"""")] - public const string MyMacro1 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public static readonly uint[] MyConst1 = new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }}; - - [NativeTypeName(""const wchar_t *"")] - public static uint[] MyConst2 = new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }}; - - [NativeTypeName(""const wchar_t *const"")] - public static readonly uint[] MyConst3 = new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }}; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public static readonly uint[] MyConst1 = new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }}; - - [NativeTypeName(""const wchar_t *"")] - public static uint[] MyConst2 = new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }}; - - [NativeTypeName(""const wchar_t *const"")] - public static readonly uint[] MyConst3 = new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }}; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 (long)0x80000000L"")] - public const IntPtr MyMacro1 = unchecked((nint)(0x80000000)); - - [NativeTypeName(""#define MyMacro2 (int)0x80000000"")] - public const int MyMacro2 = unchecked((int)(0x80000000)); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 unsigned(-1)"")] - public const uint MyMacro1 = unchecked((uint)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro3 MyMacro2(3)"")] - public const int MyMacro3 = unchecked((int)(((nuint)(1) << 31) | ((nuint)(2) << 16) | ((nuint)(3)))); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 ((int*) -1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 reinterpret_cast(-1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const int[2][2]"")] - public static readonly int[][] MyArray = new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }}; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"")] - public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); - }} -}} -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/CXXMethodDeclarationTest.cs deleted file mode 100644 index 14249777..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,1058 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpCompatibleWindows_CXXMethodDeclarationTest : 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 ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(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 ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public int value; - - public int ToInt32() - { - return value; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - - var entryPoint = Environment.Is64BitProcess ? "?DoWork@?$MyTemplate@H@@QEAAPEAHPEAH@Z" : "?DoWork@?$MyTemplate@H@@QEAPEHPEH@Z"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [NativeTypeName(""struct MyStruct : MyTemplate"")] - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern int* DoWork(MyStruct* pThis, int* value = null); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public void Dispose() - { - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = Environment.Is64BitProcess - ? "?MyVoidMethod@MyStruct@@QEAAXXZ" - : "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(MyStruct* pThis); - - public int MyInt32Method() - {{ - return 0; - }} - - public void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(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 ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(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 ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(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 ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@"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); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new IntPtr GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public IntPtr GetType1; - - [NativeTypeName(""int (int){nativeCallConv}"")] - public IntPtr GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new IntPtr GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public IntPtr GetType1; - - [NativeTypeName(""int (int){nativeCallConv}"")] - public IntPtr GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(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 ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(); - - public static int MyInt32Method() - {{ - return 0; - }} - - public static void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(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 ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(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 ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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(""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); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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(""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); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/DeprecatedToObsoleteTest.cs deleted file mode 100644 index eea3b88d..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,521 +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; - -[Platform("win")] -public sealed class CSharpCompatibleWindows_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - [Obsolete] - MyEnum_Value1, - [Obsolete(""This is obsolete."")] - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"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, - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable0 = 0; - - [Obsolete] - public static {expectedManagedType} MyVariable1 = 0; - - [Obsolete(""This is obsolete."")] - public static {expectedManagedType} MyVariable2 = 0; - - public static {expectedManagedType} MyVariable3 = 0; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @"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() - { - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@"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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @"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(); - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/EnumDeclarationTest.cs deleted file mode 100644 index 2b345d91..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/EnumDeclarationTest.cs +++ /dev/null @@ -1,611 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpCompatibleWindows_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - [NativeTypeName(""{nativeType}"")] - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum1 : int -{ - MyEnum1_Value1, - MyEnum1_Value2, - MyEnum1_Value3, -} MyEnum1; - -namespace Namespace1 -{ - namespace Namespace2 - { - typedef enum _MyEnum2 : int - { - MyEnum2_Value1, - MyEnum2_Value2, - MyEnum2_Value3, - } MyEnum2; - - typedef enum _MyEnum3 : int - { - MyEnum3_Value1, - MyEnum3_Value2, - MyEnum3_Value3, - } MyEnum3; - - typedef enum _MyEnum4 : int - { - MyEnum4_Value1, - MyEnum4_Value2, - MyEnum4_Value3, - } MyEnum4; - } -} -"; - - var expectedOutputContents = @"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, - } -} -"; - - var remappedNames = new Dictionary { ["_MyEnum1"] = "MyEnum1", ["Namespace1.Namespace2._MyEnum2"] = "MyEnum2", ["_MyEnum3"] = "MyEnum3", ["Namespace1::Namespace2::_MyEnum4"] = "MyEnum4" }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - [Flags] - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = 1, - } -} -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using System; -using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0 = (int)(MyEnum)(10), - MyEnum_Value1 = (int)(MyEnum)(MyEnum_Value0), - MyEnum_Value2 = ((int)(MyEnum)(10)) + MyEnum_Value1, - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @"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), - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = unchecked((int)(0x80000000)), - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, - } -} -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum1 : uint - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - 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 ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @"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; - } -} -"; - 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 ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index 6fb6fe87..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,1795 +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; - -[Platform("win")] -public sealed class CSharpCompatibleWindows_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* pData, int index) - { - return pData[index]; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(bool x, bool y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - break; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction() - { - } - - public static void MyFunction() - { - MyCalledFunction(); - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction(int x, int y) - { - } - - public static void MyFunction() - { - MyCalledFunction(0, 1); - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - return condition ? lhs : rhs; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - continue; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction([NativeTypeName(""const void *"")] void* input) - { - return input; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@"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); - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - int x = 0; - int y = 1, z = 2; - - return x + y + z; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - if (condition) - { - return lhs; - } - - return rhs; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction() - { - return null; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static double MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static float MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - return; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - return -1; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(int value) - { - return &value; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* value) - { - return *value; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static bool MyFunction(bool value) - { - return !value; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return value{opcode}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return {opcode}value; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index 5b04ad84..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,429 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpCompatibleWindows_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyFunction(); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@"{expectedUsingStatement}using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeAttr ? $@"[NativeTypeName(""MyTemplate<{nativeType}>"")] " : "")}MyTemplate<{expectedManagedType}> myStruct); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTemplate"")] - public MyTemplate a; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport("""", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeNameAttr ? $@"[NativeTypeName(""{nativeType}"")] " : "")}{expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"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({expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(int value, ...);"; - - const string ExpectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionPointerDeclarationTest.cs deleted file mode 100644 index 9a27a03b..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,94 +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; - -[Platform("win")] -public sealed class CSharpCompatibleWindows_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/StructDeclarationTest.cs deleted file mode 100644 index d3eb663f..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/StructDeclarationTest.cs +++ /dev/null @@ -1,2027 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpCompatibleWindows_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[]"")] - public fixed {expectedManagedType} x[1]; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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); - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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); - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @"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(); - } -} -"; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public fixed {expectedManagedType} c[2 * 1 * 3 * 4]; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""MyBuffer"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - struct - {{ - {nativeType} value1; - - struct - {{ - {nativeType} value; - }}; - }}; - - union - {{ - {nativeType} value2; - }}; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} value; - }} - - public unsafe partial struct MyStruct - {{ - public {expectedManagedType} x; - - public {expectedManagedType} y; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Struct Anonymous; - - public ref {expectedManagedType} 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 {expectedManagedType} value1 - {{ - get - {{ - fixed (_Anonymous_e__Struct._Anonymous1_e__Struct* pField = &Anonymous.Anonymous1) - {{ - return ref pField->value1; - }} - }} - }} - - public ref {expectedManagedType} value - {{ - get - {{ - fixed (_Anonymous_e__Struct._Anonymous1_e__Struct._Anonymous_e__Struct* pField = &Anonymous.Anonymous1.Anonymous) - {{ - return ref pField->value; - }} - }} - }} - - public ref {expectedManagedType} 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 {expectedManagedType} 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 {expectedManagedType} 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(""{nativeType}[4]"")] - public fixed {expectedManagedType} buffer1[4]; - - [NativeTypeName(""MyUnion[4]"")] - public _buffer2_e__FixedBuffer buffer2; - - public partial struct _w_e__Struct - {{ - public {expectedManagedType} value; - }} - - public unsafe partial struct _Anonymous1_e__Struct - {{ - public {expectedManagedType} value1; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_e__Struct - {{ - public {expectedManagedType} value; - }} - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous2_e__Union - {{ - [FieldOffset(0)] - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"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._Anonymous_e__Struct* pField = &Anonymous.Anonymous) - { - return ref pField->w; - } - } - } - - public int o0_b0_16 - { - get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - public unsafe partial struct _Anonymous_e__Struct - { - public int z; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var usingStatement = "using System.Runtime.InteropServices;\n\n"; - var packing = " [StructLayout(LayoutKind.Sequential, Pack = 4)]\n"; - - if (!Environment.Is64BitProcess) - { - usingStatement = string.Empty; - packing = string.Empty; - } - - var expectedOutputContents = $@"{usingStatement}namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct1 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} - -{packing} public unsafe partial struct MyStruct2 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - [NativeTypeName(""example_t *"")] - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @"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; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct1A - { - public void MyMethod() - { - } - } - - [NativeTypeName(""struct MyStruct1B : MyStruct1A"")] - public partial struct MyStruct1B - { - public void MyMethod() - { - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @"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]; - } - } - } - } - } -} -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/UnionDeclarationTest.cs deleted file mode 100644 index 0c7f89bd..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/UnionDeclarationTest.cs +++ /dev/null @@ -1,1573 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpCompatibleWindows_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ", Pack = 1" : ""; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit{expectedPack})] - 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{expectedPack})] - 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); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} 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]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public fixed {expectedManagedType} c[2 * 1 * 3 * 4]; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""MyBuffer"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Union Anonymous; - - public ref {expectedManagedType} 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 {expectedManagedType} 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 {expectedManagedType} a; - - [FieldOffset(0)] - public MyStruct s; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[4]"")] - public fixed {expectedManagedType} buffer[4]; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - { - [FieldOffset(0)] - public int x; - - [FieldOffset(0)] - public int y; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] - public _Anonymous_e__Union Anonymous; - - public ref int z - { - get - { - fixed (_Anonymous_e__Union* pField = &Anonymous) - { - return ref pField->z; - } - } - } - - public ref int w - { - get - { - fixed (_Anonymous_e__Union._Anonymous_e__Union* pField = &Anonymous.Anonymous) - { - return ref pField->w; - } - } - } - - public int o0_b0_16 - { - get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int z; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int w; - - [FieldOffset(0)] - 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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public new int Equals; - - [FieldOffset(0)] - public int Dispose; - - [FieldOffset(0)] - public new int GetHashCode; - - [FieldOffset(0)] - public new int GetType; - - [FieldOffset(0)] - public new int MemberwiseClone; - - [FieldOffset(0)] - public new int ReferenceEquals; - - [FieldOffset(0)] - public new int ToString; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - [NativeTypeName(""example_t *"")] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [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_L7_C5"")] - public _Anonymous_e__Union Anonymous; - - public ref double a - { - get - { - fixed (_Anonymous_e__Union* pField = &Anonymous) - { - return ref pField->a; - } - } - } - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public double a; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - { - } -} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct _MY_UNION - {{ - [FieldOffset(0)] - [NativeTypeName(""long[2]"")] - public fixed int AsArray[2]; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L4_C5"")] - public _Anonymous_e__Struct Anonymous; - - public ref int First - {{ - get - {{ - fixed (_Anonymous_e__Struct* pField = &Anonymous) - {{ - return ref pField->First; - }} - }} - }} - - public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A - {{ - get - {{ - fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) - {{ - return ref pField->A; - }} - }} - }} - - public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B - {{ - get - {{ - fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) - {{ - return ref pField->B; - }} - }} - }} - - public unsafe partial struct _Anonymous_e__Struct - {{ - [NativeTypeName(""long"")] - public int First; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - {{ - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L9_C13"")] - public _A_e__Struct A; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C13"")] - public _B_e__Struct B; - - public partial struct _A_e__Struct - {{ - [NativeTypeName(""long"")] - public int Second; - }} - - public partial struct _B_e__Struct - {{ - [NativeTypeName(""long"")] - public int Second; - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/VarDeclarationTest.cs deleted file mode 100644 index fba485f7..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpCompatibleWindows/VarDeclarationTest.cs +++ /dev/null @@ -1,398 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpCompatibleWindows_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""{nativeType}"")] - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const GUID"")] - public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); - }} -}} -"; - - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 {nativeValue}"")] - public const {expectedManagedType} MyMacro1 = {expectedManagedValue}; - - [NativeTypeName(""#define MyMacro2 MyMacro1"")] - public const {expectedManagedType} MyMacro2 = {expectedManagedValue}; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 0 + \\\n1"")] - public const int MyMacro1 = 0 + 1; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 \""Test\0\\\r\n\t\""\"""")] - public static ReadOnlySpan MyMacro1 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 u\""Test\0\\\r\n\t\""\"""")] - public const string MyMacro1 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public const string MyConst1 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *"")] - public static string MyConst2 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *const"")] - public const string MyConst3 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public const string MyConst1 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *"")] - public static string MyConst2 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *const"")] - public const string MyConst3 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 (long)0x80000000L"")] - public const int MyMacro1 = unchecked((int)(0x80000000)); - - [NativeTypeName(""#define MyMacro2 (int)0x80000000"")] - public const int MyMacro2 = unchecked((int)(0x80000000)); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 unsigned(-1)"")] - public const uint MyMacro1 = unchecked((uint)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro3 MyMacro2(3)"")] - public const int MyMacro3 = unchecked((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 ((int*) -1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 reinterpret_cast(-1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const int[2][2]"")] - public static readonly int[][] MyArray = new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }}; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"")] - public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); - }} -}} -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/CXXMethodDeclarationTest.cs deleted file mode 100644 index 47e77d51..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,950 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpDefaultUnix_CXXMethodDeclarationTest : 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 ValidateGeneratedCSharpDefaultUnixBindingsAsync(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 ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public int value; - - public int ToInt32() - { - return value; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8$MyTemplateDoWorkEv" : "_ZN10MyTemplateIiE6DoWorkEPi"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [NativeTypeName(""struct MyStruct : MyTemplate"")] - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern int* DoWork(MyStruct* pThis, int* value = null); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public void Dispose() - { - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = Environment.Is64BitProcess - ? "?MyVoidMethod@MyStruct@@QEAAXXZ" - : "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(MyStruct* pThis); - - public int MyInt32Method() - {{ - return 0; - }} - - public void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(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 ValidateGeneratedCSharpDefaultUnixBindingsAsync(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 ValidateGeneratedCSharpDefaultUnixBindingsAsync(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 ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@"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); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new delegate* unmanaged[Thiscall] GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType1; - - [NativeTypeName(""int (int, int){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new delegate* unmanaged[Thiscall] GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType1; - - [NativeTypeName(""int (int, int){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedCSharpDefaultUnixBindingsAsync(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 ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(); - - public static int MyInt32Method() - {{ - return 0; - }} - - public static void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(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 ValidateGeneratedCSharpDefaultUnixBindingsAsync(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 ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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)); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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)); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/DeprecatedToObsoleteTest.cs deleted file mode 100644 index cfccc233..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,506 +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; - -[Platform("unix")] -public sealed class CSharpDefaultUnix_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - [Obsolete] - MyEnum_Value1, - [Obsolete(""This is obsolete."")] - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"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, - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable0 = 0; - - [Obsolete] - public static {expectedManagedType} MyVariable1 = 0; - - [Obsolete(""This is obsolete."")] - public static {expectedManagedType} MyVariable2 = 0; - - public static {expectedManagedType} MyVariable3 = 0; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @"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() - { - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@"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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @"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(); - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/EnumDeclarationTest.cs deleted file mode 100644 index 422a15b0..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/EnumDeclarationTest.cs +++ /dev/null @@ -1,611 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpDefaultUnix_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - [NativeTypeName(""{nativeType}"")] - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum1 : int -{ - MyEnum1_Value1, - MyEnum1_Value2, - MyEnum1_Value3, -} MyEnum1; - -namespace Namespace1 -{ - namespace Namespace2 - { - typedef enum _MyEnum2 : int - { - MyEnum2_Value1, - MyEnum2_Value2, - MyEnum2_Value3, - } MyEnum2; - - typedef enum _MyEnum3 : int - { - MyEnum3_Value1, - MyEnum3_Value2, - MyEnum3_Value3, - } MyEnum3; - - typedef enum _MyEnum4 : int - { - MyEnum4_Value1, - MyEnum4_Value2, - MyEnum4_Value3, - } MyEnum4; - } -} -"; - - var expectedOutputContents = @"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, - } -} -"; - - var remappedNames = new Dictionary { ["_MyEnum1"] = "MyEnum1", ["Namespace1.Namespace2._MyEnum2"] = "MyEnum2", ["_MyEnum3"] = "MyEnum3", ["Namespace1::Namespace2::_MyEnum4"] = "MyEnum4" }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - [Flags] - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = 1, - } -} -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using System; -using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0 = (int)(MyEnum)(10), - MyEnum_Value1 = (int)(MyEnum)(MyEnum_Value0), - MyEnum_Value2 = ((int)(MyEnum)(10)) + MyEnum_Value1, - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @"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), - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = unchecked((int)(0x80000000)), - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, - } -} -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum1 : uint - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - 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 ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @"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; - } -} -"; - 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 ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index a375ba77..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,1779 +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; - -[Platform("unix")] -public sealed class CSharpDefaultUnix_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* pData, int index) - { - return pData[index]; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(bool x, bool y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - break; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction() - { - } - - public static void MyFunction() - { - MyCalledFunction(); - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction(int x, int y) - { - } - - public static void MyFunction() - { - MyCalledFunction(0, 1); - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - return condition ? lhs : rhs; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - continue; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction([NativeTypeName(""const void *"")] void* input) - { - return input; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@"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); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - int x = 0; - int y = 1, z = 2; - - return x + y + z; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - if (condition) - { - return lhs; - } - - return rhs; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction() - { - return null; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static double MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static float MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - return; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - return -1; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @"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; - - public ref int a - { - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - } - } - - 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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(int value) - { - return &value; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* value) - { - return *value; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static bool MyFunction(bool value) - { - return !value; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return value{opcode}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return {opcode}value; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index e738ed82..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,411 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpDefaultUnix_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyFunction(); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@"{expectedUsingStatement}using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeAttr ? $@"[NativeTypeName(""MyTemplate<{nativeType}>"")] " : "")}MyTemplate<{expectedManagedType}> myStruct); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTemplate"")] - public MyTemplate a; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport("""", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeNameAttr ? $@"[NativeTypeName(""{nativeType}"")] " : "")}{expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"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({expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() => Task.CompletedTask; - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionPointerDeclarationTest.cs deleted file mode 100644 index c73ce7a2..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,76 +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; - -[Platform("unix")] -public sealed class CSharpDefaultUnix_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback"")] - public delegate* unmanaged[Cdecl] _callback; - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback"")] - public delegate* unmanaged[Stdcall] _callback; - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback *"")] - public delegate* unmanaged[Cdecl] _callback; - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/StructDeclarationTest.cs deleted file mode 100644 index 8b519a65..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/StructDeclarationTest.cs +++ /dev/null @@ -1,1998 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpDefaultUnix_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[]"")] - public fixed {expectedManagedType} x[1]; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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 o4_b22_1 - { - readonly get - { - return (byte)((_bitfield2 >> 22) & 0x1u); - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b23_1 - { - readonly get - { - return (int)(_bitfield2 << 8) >> 31; - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b24_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); - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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(""o4_b22_1"", offset: 22, length: 1)] - [NativeBitfield(""o4_b23_1"", offset: 23, length: 1)] - [NativeBitfield(""o4_b24_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 o4_b22_1 - { - readonly get - { - return (byte)((_bitfield2 >> 22) & 0x1u); - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b23_1 - { - readonly get - { - return (int)(_bitfield2 << 8) >> 31; - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b24_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); - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @"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(); - } -} -"; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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 ref MyStruct this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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 ref MyStruct this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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 ref MyStruct this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} 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 ref MyStruct this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public fixed {expectedManagedType} c[2 * 1 * 3 * 4]; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""MyBuffer"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - struct - {{ - {nativeType} value1; - - struct - {{ - {nativeType} value; - }}; - }}; - - union - {{ - {nativeType} value2; - }}; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} value; - }} - - public unsafe partial struct MyStruct - {{ - public {expectedManagedType} x; - - public {expectedManagedType} y; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Struct Anonymous; - - public ref {expectedManagedType} z - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); - }} - }} - - public ref _Anonymous_e__Struct._w_e__Struct w - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); - }} - }} - - public ref {expectedManagedType} value1 - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); - }} - }} - - public ref {expectedManagedType} value - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); - }} - }} - - public ref {expectedManagedType} value2 - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); - }} - }} - - public ref MyUnion u - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); - }} - }} - - public Span<{expectedManagedType}> buffer1 - {{ - get - {{ - return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); - }} - }} - - public Span buffer2 - {{ - get - {{ - return Anonymous.buffer2.AsSpan(); - }} - }} - - public unsafe partial struct _Anonymous_e__Struct - {{ - public {expectedManagedType} 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(""{nativeType}[4]"")] - public fixed {expectedManagedType} buffer1[4]; - - [NativeTypeName(""MyUnion[4]"")] - public _buffer2_e__FixedBuffer buffer2; - - public partial struct _w_e__Struct - {{ - public {expectedManagedType} value; - }} - - public partial struct _Anonymous1_e__Struct - {{ - public {expectedManagedType} value1; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_e__Struct - {{ - public {expectedManagedType} value; - }} - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous2_e__Union - {{ - [FieldOffset(0)] - public {expectedManagedType} value2; - }} - - public partial struct _buffer2_e__FixedBuffer - {{ - public MyUnion e0; - public MyUnion e1; - public MyUnion e2; - public MyUnion e3; - - public ref MyUnion this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 4); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public int x; - - public int y; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] - public _Anonymous_e__Struct Anonymous; - - public ref int z - { - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); - } - } - - public ref int w - { - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); - } - } - - public int o0_b0_16 - { - readonly get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - readonly get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - public partial struct _Anonymous_e__Struct - { - public int z; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var usingStatement = "using System.Runtime.InteropServices;\n\n"; - var packing = " [StructLayout(LayoutKind.Sequential, Pack = 4)]\n"; - - if (!Environment.Is64BitProcess) - { - usingStatement = string.Empty; - packing = string.Empty; - } - - var expectedOutputContents = $@"{usingStatement}namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct1 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} - -{packing} public unsafe partial struct MyStruct2 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - [NativeTypeName(""example_t *"")] - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -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; - - public ref double a - { - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - } - } - - public partial struct _Anonymous_e__Struct - { - public double a; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct1A - { - public void MyMethod() - { - } - } - - [NativeTypeName(""struct MyStruct1B : MyStruct1A"")] - public partial struct MyStruct1B - { - public void MyMethod() - { - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"typedef int size_t; - -struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @"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 nuint e0; - public nuint e1; - - public ref nuint this[int index] - { - get - { - return ref AsSpan()[index]; - } - } - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 2); - } - } -} -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/UnionDeclarationTest.cs deleted file mode 100644 index 450dac95..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/UnionDeclarationTest.cs +++ /dev/null @@ -1,1558 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpDefaultUnix_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ", Pack = 1" : ""; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit{expectedPack})] - 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 o4_b22_1 - {{ - readonly get - {{ - return (byte)((_bitfield2 >> 22) & 0x1u); - }} - - set - {{ - _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22); - }} - }} - - [NativeTypeName(""int : 1"")] - public int o4_b23_1 - {{ - readonly get - {{ - return (int)(_bitfield2 << 8) >> 31; - }} - - set - {{ - _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23); - }} - }} - - [NativeTypeName(""int : 1"")] - public int o4_b24_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{expectedPack})] - 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); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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 ref MyUnion this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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 ref MyUnion this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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 ref MyUnion this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} 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 ref MyUnion this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public fixed {expectedManagedType} c[2 * 1 * 3 * 4]; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""MyBuffer"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Union Anonymous; - - public ref {expectedManagedType} a - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - }} - }} - - public ref MyStruct s - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); - }} - }} - - public Span<{expectedManagedType}> buffer - {{ - get - {{ - return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); - }} - }} - - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct _Anonymous_e__Union - {{ - [FieldOffset(0)] - public {expectedManagedType} a; - - [FieldOffset(0)] - public MyStruct s; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[4]"")] - public fixed {expectedManagedType} buffer[4]; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - { - [FieldOffset(0)] - public int x; - - [FieldOffset(0)] - public int y; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] - public _Anonymous_e__Union Anonymous; - - public ref int z - { - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); - } - } - - public ref int w - { - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); - } - } - - public int o0_b0_16 - { - readonly get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - readonly get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int z; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int w; - - [FieldOffset(0)] - 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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public new int Equals; - - [FieldOffset(0)] - public int Dispose; - - [FieldOffset(0)] - public new int GetHashCode; - - [FieldOffset(0)] - public new int GetType; - - [FieldOffset(0)] - public new int MemberwiseClone; - - [FieldOffset(0)] - public new int ReferenceEquals; - - [FieldOffset(0)] - public new int ToString; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - [NativeTypeName(""example_t *"")] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @"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; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] - public _Anonymous_e__Union Anonymous; - - public ref double a - { - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - } - } - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public double a; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - { - } -} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct _MY_UNION - {{ - [FieldOffset(0)] - [NativeTypeName(""long[2]"")] - public _AsArray_e__FixedBuffer AsArray; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L4_C5"")] - public _Anonymous_e__Struct Anonymous; - - public ref nint First - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.First, 1)); - }} - }} - - public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.A, 1)); - }} - }} - - public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.B, 1)); - }} - }} - - public partial struct _Anonymous_e__Struct - {{ - [NativeTypeName(""long"")] - public nint First; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - {{ - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L9_C13"")] - public _A_e__Struct A; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C13"")] - public _B_e__Struct B; - - public partial struct _A_e__Struct - {{ - [NativeTypeName(""long"")] - public nint Second; - }} - - public partial struct _B_e__Struct - {{ - [NativeTypeName(""long"")] - public nint Second; - }} - }} - }} - - public partial struct _AsArray_e__FixedBuffer - {{ - public nint e0; - public nint e1; - - public ref nint this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 2); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/VarDeclarationTest.cs deleted file mode 100644 index 611048ea..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultUnix/VarDeclarationTest.cs +++ /dev/null @@ -1,398 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpDefaultUnix_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""{nativeType}"")] - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const GUID"")] - public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); - }} -}} -"; - - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 {nativeValue}"")] - public const {expectedManagedType} MyMacro1 = {expectedManagedValue}; - - [NativeTypeName(""#define MyMacro2 MyMacro1"")] - public const {expectedManagedType} MyMacro2 = {expectedManagedValue}; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 0 + \\\n1"")] - public const int MyMacro1 = 0 + 1; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 \""Test\0\\\r\n\t\""\"""")] - public static ReadOnlySpan MyMacro1 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 u\""Test\0\\\r\n\t\""\"""")] - public const string MyMacro1 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public static readonly uint[] MyConst1 = new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }}; - - [NativeTypeName(""const wchar_t *"")] - public static uint[] MyConst2 = new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }}; - - [NativeTypeName(""const wchar_t *const"")] - public static readonly uint[] MyConst3 = new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }}; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public static readonly uint[] MyConst1 = new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }}; - - [NativeTypeName(""const wchar_t *"")] - public static uint[] MyConst2 = new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }}; - - [NativeTypeName(""const wchar_t *const"")] - public static readonly uint[] MyConst3 = new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }}; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 (long)0x80000000L"")] - public const nint MyMacro1 = unchecked((nint)(0x80000000)); - - [NativeTypeName(""#define MyMacro2 (int)0x80000000"")] - public const int MyMacro2 = unchecked((int)(0x80000000)); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 unsigned(-1)"")] - public const uint MyMacro1 = unchecked((uint)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro3 MyMacro2(3)"")] - public const int MyMacro3 = unchecked((int)(((nuint)(1) << 31) | ((nuint)(2) << 16) | ((nuint)(3)))); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 ((int*) -1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 reinterpret_cast(-1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const int[2][2]"")] - public static readonly int[][] MyArray = new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }}; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"")] - public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); - }} -}} -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedCSharpDefaultUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/CXXMethodDeclarationTest.cs deleted file mode 100644 index 01f769a5..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,955 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpDefaultWindows_CXXMethodDeclarationTest : 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 ValidateGeneratedCSharpDefaultWindowsBindingsAsync(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 ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public int value; - - public int ToInt32() - { - return value; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - - var entryPoint = Environment.Is64BitProcess ? "?DoWork@?$MyTemplate@H@@QEAAPEAHPEAH@Z" : "?DoWork@?$MyTemplate@H@@QEAPEHPEH@Z"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [NativeTypeName(""struct MyStruct : MyTemplate"")] - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern int* DoWork(MyStruct* pThis, int* value = null); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public void Dispose() - { - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - if (!Environment.Is64BitProcess) - { - entryPoint = "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - else - { - entryPoint = "?MyVoidMethod@MyStruct@@QEAAXXZ"; - } - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(MyStruct* pThis); - - public int MyInt32Method() - {{ - return 0; - }} - - public void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(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 ValidateGeneratedCSharpDefaultWindowsBindingsAsync(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 ValidateGeneratedCSharpDefaultWindowsBindingsAsync(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 ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@"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); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new delegate* unmanaged[Thiscall] GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType1; - - [NativeTypeName(""int (int){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new delegate* unmanaged[Thiscall] GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType1; - - [NativeTypeName(""int (int){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedCSharpDefaultWindowsBindingsAsync(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 ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(); - - public static int MyInt32Method() - {{ - return 0; - }} - - public static void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(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 ValidateGeneratedCSharpDefaultWindowsBindingsAsync(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 ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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)); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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)); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/DeprecatedToObsoleteTest.cs deleted file mode 100644 index 0135ae7f..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,506 +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; - -[Platform("win")] -public sealed class CSharpDefaultWindows_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - [Obsolete] - MyEnum_Value1, - [Obsolete(""This is obsolete."")] - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"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, - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable0 = 0; - - [Obsolete] - public static {expectedManagedType} MyVariable1 = 0; - - [Obsolete(""This is obsolete."")] - public static {expectedManagedType} MyVariable2 = 0; - - public static {expectedManagedType} MyVariable3 = 0; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @"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() - { - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@"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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @"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(); - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/EnumDeclarationTest.cs deleted file mode 100644 index 5b394eed..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/EnumDeclarationTest.cs +++ /dev/null @@ -1,610 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpDefaultWindows_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - [NativeTypeName(""{nativeType}"")] - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum1 : int -{ - MyEnum1_Value1, - MyEnum1_Value2, - MyEnum1_Value3, -} MyEnum1; - -namespace Namespace1 -{ - namespace Namespace2 - { - typedef enum _MyEnum2 : int - { - MyEnum2_Value1, - MyEnum2_Value2, - MyEnum2_Value3, - } MyEnum2; - - typedef enum _MyEnum3 : int - { - MyEnum3_Value1, - MyEnum3_Value2, - MyEnum3_Value3, - } MyEnum3; - - typedef enum _MyEnum4 : int - { - MyEnum4_Value1, - MyEnum4_Value2, - MyEnum4_Value3, - } MyEnum4; - } -} -"; - - var expectedOutputContents = @"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, - } -} -"; - - var remappedNames = new Dictionary { ["_MyEnum1"] = "MyEnum1", ["Namespace1.Namespace2._MyEnum2"] = "MyEnum2", ["_MyEnum3"] = "MyEnum3", ["Namespace1::Namespace2::_MyEnum4"] = "MyEnum4" }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - [Flags] - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = 1, - } -} -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using System; -using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0 = (int)(MyEnum)(10), - MyEnum_Value1 = (int)(MyEnum)(MyEnum_Value0), - MyEnum_Value2 = ((int)(MyEnum)(10)) + MyEnum_Value1, - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @"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), - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = unchecked((int)(0x80000000)), - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, - } -} -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum1 : uint - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - 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 ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @"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; - } -} -"; - 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 ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index ce5e2d6d..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,1779 +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; - -[Platform("win")] -public sealed class CSharpDefaultWindows_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* pData, int index) - { - return pData[index]; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(bool x, bool y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - break; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction() - { - } - - public static void MyFunction() - { - MyCalledFunction(); - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction(int x, int y) - { - } - - public static void MyFunction() - { - MyCalledFunction(0, 1); - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - return condition ? lhs : rhs; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - continue; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction([NativeTypeName(""const void *"")] void* input) - { - return input; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@"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); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - int x = 0; - int y = 1, z = 2; - - return x + y + z; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - if (condition) - { - return lhs; - } - - return rhs; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction() - { - return null; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static double MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static float MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - return; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - return -1; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @"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; - - public ref int a - { - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - } - } - - 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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(int value) - { - return &value; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* value) - { - return *value; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static bool MyFunction(bool value) - { - return !value; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return value{opcode}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return {opcode}value; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index 4c72b3f4..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,429 +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.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpDefaultWindows_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyFunction(); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@"{expectedUsingStatement}using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeAttr ? $@"[NativeTypeName(""MyTemplate<{nativeType}>"")] " : "")}MyTemplate<{expectedManagedType}> myStruct); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTemplate"")] - public MyTemplate a; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport("""", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeNameAttr ? $@"[NativeTypeName(""{nativeType}"")] " : "")}{expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"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({expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(int value, ...);"; - - const string ExpectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionPointerDeclarationTest.cs deleted file mode 100644 index 81848773..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,76 +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; - -[Platform("win")] -public sealed class CSharpDefaultWindows_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback"")] - public delegate* unmanaged[Cdecl] _callback; - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback"")] - public delegate* unmanaged[Stdcall] _callback; - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback *"")] - public delegate* unmanaged[Cdecl] _callback; - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/StructDeclarationTest.cs deleted file mode 100644 index cff1dc8f..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/StructDeclarationTest.cs +++ /dev/null @@ -1,2004 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpDefaultWindows_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[]"")] - public fixed {expectedManagedType} x[1]; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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); - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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); - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @"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(); - } -} -"; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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 ref MyStruct this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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 ref MyStruct this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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 ref MyStruct this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} 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 ref MyStruct this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public fixed {expectedManagedType} c[2 * 1 * 3 * 4]; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [NativeTypeName(""MyBuffer"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - struct - {{ - {nativeType} value1; - - struct - {{ - {nativeType} value; - }}; - }}; - - union - {{ - {nativeType} value2; - }}; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} value; - }} - - public unsafe partial struct MyStruct - {{ - public {expectedManagedType} x; - - public {expectedManagedType} y; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Struct Anonymous; - - public ref {expectedManagedType} z - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); - }} - }} - - public ref _Anonymous_e__Struct._w_e__Struct w - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); - }} - }} - - public ref {expectedManagedType} value1 - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.value1, 1)); - }} - }} - - public ref {expectedManagedType} value - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous1.Anonymous.value, 1)); - }} - }} - - public ref {expectedManagedType} value2 - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous2.value2, 1)); - }} - }} - - public ref MyUnion u - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); - }} - }} - - public Span<{expectedManagedType}> buffer1 - {{ - get - {{ - return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); - }} - }} - - public Span buffer2 - {{ - get - {{ - return Anonymous.buffer2.AsSpan(); - }} - }} - - public unsafe partial struct _Anonymous_e__Struct - {{ - public {expectedManagedType} 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(""{nativeType}[4]"")] - public fixed {expectedManagedType} buffer1[4]; - - [NativeTypeName(""MyUnion[4]"")] - public _buffer2_e__FixedBuffer buffer2; - - public partial struct _w_e__Struct - {{ - public {expectedManagedType} value; - }} - - public partial struct _Anonymous1_e__Struct - {{ - public {expectedManagedType} value1; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_e__Struct - {{ - public {expectedManagedType} value; - }} - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous2_e__Union - {{ - [FieldOffset(0)] - public {expectedManagedType} value2; - }} - - public partial struct _buffer2_e__FixedBuffer - {{ - public MyUnion e0; - public MyUnion e1; - public MyUnion e2; - public MyUnion e3; - - public ref MyUnion this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 4); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public int x; - - public int y; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] - public _Anonymous_e__Struct Anonymous; - - public ref int z - { - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); - } - } - - public ref int w - { - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); - } - } - - public int o0_b0_16 - { - readonly get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - readonly get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - public partial struct _Anonymous_e__Struct - { - public int z; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var usingStatement = "using System.Runtime.InteropServices;\n\n"; - var packing = " [StructLayout(LayoutKind.Sequential, Pack = 4)]\n"; - - if (!Environment.Is64BitProcess) - { - usingStatement = string.Empty; - packing = string.Empty; - } - - var expectedOutputContents = $@"{usingStatement}namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct1 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} - -{packing} public unsafe partial struct MyStruct2 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - [NativeTypeName(""example_t *"")] - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -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; - - public ref double a - { - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - } - } - - public partial struct _Anonymous_e__Struct - { - public double a; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct1A - { - public void MyMethod() - { - } - } - - [NativeTypeName(""struct MyStruct1B : MyStruct1A"")] - public partial struct MyStruct1B - { - public void MyMethod() - { - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @"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 nuint e0; - public nuint e1; - - public ref nuint this[int index] - { - get - { - return ref AsSpan()[index]; - } - } - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 2); - } - } -} -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/UnionDeclarationTest.cs deleted file mode 100644 index fa7cbdb3..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/UnionDeclarationTest.cs +++ /dev/null @@ -1,1547 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpDefaultWindows_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ", Pack = 1" : ""; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit{expectedPack})] - 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{expectedPack})] - 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); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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 ref MyUnion this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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 ref MyUnion this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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 ref MyUnion this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} 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 ref MyUnion this[int index] - {{ - get - {{ - return ref AsSpan()[index]; - }} - }} - - public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 3); - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public fixed {expectedManagedType} c[2 * 1 * 3 * 4]; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""MyBuffer"")] - public fixed {expectedManagedType} c[3]; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Union Anonymous; - - public ref {expectedManagedType} a - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - }} - }} - - public ref MyStruct s - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); - }} - }} - - public Span<{expectedManagedType}> buffer - {{ - get - {{ - return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); - }} - }} - - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct _Anonymous_e__Union - {{ - [FieldOffset(0)] - public {expectedManagedType} a; - - [FieldOffset(0)] - public MyStruct s; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[4]"")] - public fixed {expectedManagedType} buffer[4]; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - { - [FieldOffset(0)] - public int x; - - [FieldOffset(0)] - public int y; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] - public _Anonymous_e__Union Anonymous; - - public ref int z - { - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); - } - } - - public ref int w - { - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); - } - } - - public int o0_b0_16 - { - readonly get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - readonly get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int z; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int w; - - [FieldOffset(0)] - 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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public new int Equals; - - [FieldOffset(0)] - public int Dispose; - - [FieldOffset(0)] - public new int GetHashCode; - - [FieldOffset(0)] - public new int GetType; - - [FieldOffset(0)] - public new int MemberwiseClone; - - [FieldOffset(0)] - public new int ReferenceEquals; - - [FieldOffset(0)] - public new int ToString; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - [NativeTypeName(""example_t *"")] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @"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; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] - public _Anonymous_e__Union Anonymous; - - public ref double a - { - get - { - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - } - } - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public double a; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - { - } -} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct _MY_UNION - {{ - [FieldOffset(0)] - [NativeTypeName(""long[2]"")] - public fixed int AsArray[2]; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L4_C5"")] - public _Anonymous_e__Struct Anonymous; - - public ref int First - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.First, 1)); - }} - }} - - public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.A, 1)); - }} - }} - - public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B - {{ - get - {{ - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.B, 1)); - }} - }} - - public partial struct _Anonymous_e__Struct - {{ - [NativeTypeName(""long"")] - public int First; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - {{ - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L9_C13"")] - public _A_e__Struct A; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C13"")] - public _B_e__Struct B; - - public partial struct _A_e__Struct - {{ - [NativeTypeName(""long"")] - public int Second; - }} - - public partial struct _B_e__Struct - {{ - [NativeTypeName(""long"")] - public int Second; - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/VarDeclarationTest.cs deleted file mode 100644 index bc82da08..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpDefaultWindows/VarDeclarationTest.cs +++ /dev/null @@ -1,398 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpDefaultWindows_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""{nativeType}"")] - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const GUID"")] - public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); - }} -}} -"; - - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 {nativeValue}"")] - public const {expectedManagedType} MyMacro1 = {expectedManagedValue}; - - [NativeTypeName(""#define MyMacro2 MyMacro1"")] - public const {expectedManagedType} MyMacro2 = {expectedManagedValue}; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 0 + \\\n1"")] - public const int MyMacro1 = 0 + 1; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 \""Test\0\\\r\n\t\""\"""")] - public static ReadOnlySpan MyMacro1 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 u\""Test\0\\\r\n\t\""\"""")] - public const string MyMacro1 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public const string MyConst1 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *"")] - public static string MyConst2 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *const"")] - public const string MyConst3 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public const string MyConst1 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *"")] - public static string MyConst2 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *const"")] - public const string MyConst3 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }}; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 (long)0x80000000L"")] - public const int MyMacro1 = unchecked((int)(0x80000000)); - - [NativeTypeName(""#define MyMacro2 (int)0x80000000"")] - public const int MyMacro2 = unchecked((int)(0x80000000)); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 unsigned(-1)"")] - public const uint MyMacro1 = unchecked((uint)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro3 MyMacro2(3)"")] - public const int MyMacro3 = unchecked((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 ((int*) -1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 reinterpret_cast(-1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const int[2][2]"")] - public static readonly int[][] MyArray = new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }}; - }} -}} -"; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"")] - public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); - }} -}} -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/CXXMethodDeclarationTest.cs deleted file mode 100644 index 9ac0558a..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,950 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpLatestUnix_CXXMethodDeclarationTest : 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 ValidateGeneratedCSharpLatestUnixBindingsAsync(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 ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public int value; - - public int ToInt32() - { - return value; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8$MyTemplateDoWorkEv" : "_ZN10MyTemplateIiE6DoWorkEPi"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [NativeTypeName(""struct MyStruct : MyTemplate"")] - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern int* DoWork(MyStruct* pThis, int* value = null); - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public void Dispose() - { - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = Environment.Is64BitProcess - ? "?MyVoidMethod@MyStruct@@QEAAXXZ" - : "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(MyStruct* pThis); - - public int MyInt32Method() - {{ - return 0; - }} - - public void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(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 ValidateGeneratedCSharpLatestUnixBindingsAsync(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 ValidateGeneratedCSharpLatestUnixBindingsAsync(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 ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@"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); - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new delegate* unmanaged[Thiscall] GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType1; - - [NativeTypeName(""int (int, int){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new delegate* unmanaged[Thiscall] GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType1; - - [NativeTypeName(""int (int, int){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedCSharpLatestUnixBindingsAsync(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 ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(); - - public static int MyInt32Method() - {{ - return 0; - }} - - public static void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(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 ValidateGeneratedCSharpLatestUnixBindingsAsync(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 ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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)); - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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)); - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/DeprecatedToObsoleteTest.cs deleted file mode 100644 index 25abcf97..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,506 +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; - -[Platform("unix")] -public sealed class CSharpLatestUnix_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - [Obsolete] - MyEnum_Value1, - [Obsolete(""This is obsolete."")] - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"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, - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable0 = 0; - - [Obsolete] - public static {expectedManagedType} MyVariable1 = 0; - - [Obsolete(""This is obsolete."")] - public static {expectedManagedType} MyVariable2 = 0; - - public static {expectedManagedType} MyVariable3 = 0; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @"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() - { - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@"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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @"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(); - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/EnumDeclarationTest.cs deleted file mode 100644 index a29d6522..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/EnumDeclarationTest.cs +++ /dev/null @@ -1,611 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpLatestUnix_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - [NativeTypeName(""{nativeType}"")] - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum1 : int -{ - MyEnum1_Value1, - MyEnum1_Value2, - MyEnum1_Value3, -} MyEnum1; - -namespace Namespace1 -{ - namespace Namespace2 - { - typedef enum _MyEnum2 : int - { - MyEnum2_Value1, - MyEnum2_Value2, - MyEnum2_Value3, - } MyEnum2; - - typedef enum _MyEnum3 : int - { - MyEnum3_Value1, - MyEnum3_Value2, - MyEnum3_Value3, - } MyEnum3; - - typedef enum _MyEnum4 : int - { - MyEnum4_Value1, - MyEnum4_Value2, - MyEnum4_Value3, - } MyEnum4; - } -} -"; - - var expectedOutputContents = @"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, - } -} -"; - - var remappedNames = new Dictionary { ["_MyEnum1"] = "MyEnum1", ["Namespace1.Namespace2._MyEnum2"] = "MyEnum2", ["_MyEnum3"] = "MyEnum3", ["Namespace1::Namespace2::_MyEnum4"] = "MyEnum4" }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - [Flags] - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = 1, - } -} -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using System; -using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0 = (int)(MyEnum)(10), - MyEnum_Value1 = (int)(MyEnum)(MyEnum_Value0), - MyEnum_Value2 = ((int)(MyEnum)(10)) + MyEnum_Value1, - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @"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), - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = unchecked((int)(0x80000000)), - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, - } -} -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum1 : uint - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - 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 ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @"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; - } -} -"; - 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 ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index 1c8e0f1c..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,1781 +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; - -[Platform("unix")] -public sealed class CSharpLatestUnix_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* pData, int index) - { - return pData[index]; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(bool x, bool y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - break; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction() - { - } - - public static void MyFunction() - { - MyCalledFunction(); - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction(int x, int y) - { - } - - public static void MyFunction() - { - MyCalledFunction(0, 1); - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - return condition ? lhs : rhs; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - continue; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction([NativeTypeName(""const void *"")] void* input) - { - return input; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@"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); - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - int x = 0; - int y = 1, z = 2; - - return x + y + z; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - if (condition) - { - return lhs; - } - - return rhs; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction() - { - return null; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static double MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static float MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - return; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - return -1; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(int value) - { - return &value; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* value) - { - return *value; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static bool MyFunction(bool value) - { - return !value; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return value{opcode}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return {opcode}value; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index f79b003e..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,411 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpLatestUnix_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyFunction(); - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@"{expectedUsingStatement}using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeAttr ? $@"[NativeTypeName(""MyTemplate<{nativeType}>"")] " : "")}MyTemplate<{expectedManagedType}> myStruct); - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTemplate"")] - public MyTemplate a; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport("""", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeNameAttr ? $@"[NativeTypeName(""{nativeType}"")] " : "")}{expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"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({expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() => Task.CompletedTask; - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionPointerDeclarationTest.cs deleted file mode 100644 index e7253c5b..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,76 +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; - -[Platform("unix")] -public sealed class CSharpLatestUnix_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback"")] - public delegate* unmanaged[Cdecl] _callback; - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback"")] - public delegate* unmanaged[Stdcall] _callback; - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback *"")] - public delegate* unmanaged[Cdecl] _callback; - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/StructDeclarationTest.cs deleted file mode 100644 index b0d04972..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/StructDeclarationTest.cs +++ /dev/null @@ -1,1960 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpLatestUnix_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[]"")] - public _x_e__FixedBuffer x; - - public partial struct _x_e__FixedBuffer - {{ - public {expectedManagedType} e0; - - [UnscopedRef] - public ref {expectedManagedType} this[int index] - {{ - get - {{ - return ref Unsafe.Add(ref e0, index); - }} - }} - - [UnscopedRef] - public Span<{expectedManagedType}> AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length); - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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 o4_b22_1 - { - readonly get - { - return (byte)((_bitfield2 >> 22) & 0x1u); - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b23_1 - { - readonly get - { - return (int)(_bitfield2 << 8) >> 31; - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b24_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); - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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(""o4_b22_1"", offset: 22, length: 1)] - [NativeBitfield(""o4_b23_1"", offset: 23, length: 1)] - [NativeBitfield(""o4_b24_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 o4_b22_1 - { - readonly get - { - return (byte)((_bitfield2 >> 22) & 0x1u); - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b23_1 - { - readonly get - { - return (int)(_bitfield2 << 8) >> 31; - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b24_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); - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @"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(); - } -} -"; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - public partial struct MyOtherStruct - {{ - [NativeTypeName(""MyStruct[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public MyStruct e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - public partial struct MyOtherStruct - {{ - [NativeTypeName(""MyBuffer"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public MyStruct e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} value; - }} - - public partial struct MyOtherStruct - {{ - [NativeTypeName(""MyStruct[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public MyStruct e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public _c_e__FixedBuffer c; - - [InlineArray(2 * 1 * 3 * 4)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0_0_0_0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"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 {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - struct - {{ - {nativeType} value1; - - struct - {{ - {nativeType} value; - }}; - }}; - - union - {{ - {nativeType} value2; - }}; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"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 {expectedManagedType} value; - }} - - public partial struct MyStruct - {{ - public {expectedManagedType} x; - - public {expectedManagedType} y; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Struct Anonymous; - - [UnscopedRef] - public ref {expectedManagedType} z - {{ - get - {{ - return ref Anonymous.z; - }} - }} - - [UnscopedRef] - public ref _Anonymous_e__Struct._w_e__Struct w - {{ - get - {{ - return ref Anonymous.w; - }} - }} - - [UnscopedRef] - public ref {expectedManagedType} value1 - {{ - get - {{ - return ref Anonymous.Anonymous1.value1; - }} - }} - - [UnscopedRef] - public ref {expectedManagedType} value - {{ - get - {{ - return ref Anonymous.Anonymous1.Anonymous.value; - }} - }} - - [UnscopedRef] - public ref {expectedManagedType} value2 - {{ - get - {{ - return ref Anonymous.Anonymous2.value2; - }} - }} - - [UnscopedRef] - public ref MyUnion u - {{ - get - {{ - return ref Anonymous.u; - }} - }} - - [UnscopedRef] - public Span<{expectedManagedType}> buffer1 - {{ - get - {{ - return Anonymous.buffer1; - }} - }} - - [UnscopedRef] - public Span buffer2 - {{ - get - {{ - return Anonymous.buffer2; - }} - }} - - public partial struct _Anonymous_e__Struct - {{ - public {expectedManagedType} 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(""{nativeType}[4]"")] - public _buffer1_e__FixedBuffer buffer1; - - [NativeTypeName(""MyUnion[4]"")] - public _buffer2_e__FixedBuffer buffer2; - - public partial struct _w_e__Struct - {{ - public {expectedManagedType} value; - }} - - public partial struct _Anonymous1_e__Struct - {{ - public {expectedManagedType} value1; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_e__Struct - {{ - public {expectedManagedType} value; - }} - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous2_e__Union - {{ - [FieldOffset(0)] - public {expectedManagedType} value2; - }} - - [InlineArray(4)] - public partial struct _buffer1_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - - [InlineArray(4)] - public partial struct _buffer2_e__FixedBuffer - {{ - public MyUnion e0; - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"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.Anonymous.w; - } - } - - public int o0_b0_16 - { - readonly get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - readonly get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - public partial struct _Anonymous_e__Struct - { - public int z; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var usingStatement = "using System.Runtime.InteropServices;\n\n"; - var packing = " [StructLayout(LayoutKind.Sequential, Pack = 4)]\n"; - - if (!Environment.Is64BitProcess) - { - usingStatement = string.Empty; - packing = string.Empty; - } - - var expectedOutputContents = $@"{usingStatement}namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct1 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} - -{packing} public unsafe partial struct MyStruct2 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - [NativeTypeName(""example_t *"")] - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @"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; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct1A - { - public void MyMethod() - { - } - } - - [NativeTypeName(""struct MyStruct1B : MyStruct1A"")] - public partial struct MyStruct1B - { - public void MyMethod() - { - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"typedef int size_t; - -struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @"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; - } - } -} -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/UnionDeclarationTest.cs deleted file mode 100644 index 1f8fb1f1..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/UnionDeclarationTest.cs +++ /dev/null @@ -1,1513 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpLatestUnix_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ", Pack = 1" : ""; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit{expectedPack})] - 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 o4_b22_1 - {{ - readonly get - {{ - return (byte)((_bitfield2 >> 22) & 0x1u); - }} - - set - {{ - _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22); - }} - }} - - [NativeTypeName(""int : 1"")] - public int o4_b23_1 - {{ - readonly get - {{ - return (int)(_bitfield2 << 8) >> 31; - }} - - set - {{ - _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23); - }} - }} - - [NativeTypeName(""int : 1"")] - public int o4_b24_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{expectedPack})] - 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); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public _c_e__FixedBuffer c; - - [InlineArray(2 * 1 * 3 * 4)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0_0_0_0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"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 {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Union Anonymous; - - [UnscopedRef] - public ref {expectedManagedType} a - {{ - get - {{ - return ref Anonymous.a; - }} - }} - - [UnscopedRef] - public ref MyStruct s - {{ - get - {{ - return ref Anonymous.s; - }} - }} - - [UnscopedRef] - public Span<{expectedManagedType}> buffer - {{ - get - {{ - return Anonymous.buffer; - }} - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - {{ - [FieldOffset(0)] - public {expectedManagedType} a; - - [FieldOffset(0)] - public MyStruct s; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[4]"")] - public _buffer_e__FixedBuffer buffer; - - [InlineArray(4)] - public partial struct _buffer_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - { - [FieldOffset(0)] - public int x; - - [FieldOffset(0)] - public int y; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] - public _Anonymous_e__Union Anonymous; - - [UnscopedRef] - public ref int z - { - get - { - return ref Anonymous.z; - } - } - - [UnscopedRef] - public ref int w - { - get - { - return ref Anonymous.Anonymous.w; - } - } - - public int o0_b0_16 - { - readonly get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - readonly get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int z; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int w; - - [FieldOffset(0)] - 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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public new int Equals; - - [FieldOffset(0)] - public int Dispose; - - [FieldOffset(0)] - public new int GetHashCode; - - [FieldOffset(0)] - public new int GetType; - - [FieldOffset(0)] - public new int MemberwiseClone; - - [FieldOffset(0)] - public new int ReferenceEquals; - - [FieldOffset(0)] - public new int ToString; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - [NativeTypeName(""example_t *"")] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @"using System.Diagnostics.CodeAnalysis; -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; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] - public _Anonymous_e__Union Anonymous; - - [UnscopedRef] - public ref double a - { - get - { - return ref Anonymous.a; - } - } - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public double a; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - { - } -} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@"using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct _MY_UNION - {{ - [FieldOffset(0)] - [NativeTypeName(""long[2]"")] - public _AsArray_e__FixedBuffer AsArray; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L4_C5"")] - public _Anonymous_e__Struct Anonymous; - - [UnscopedRef] - public ref nint First - {{ - get - {{ - return ref Anonymous.First; - }} - }} - - [UnscopedRef] - public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A - {{ - get - {{ - return ref Anonymous.Anonymous.A; - }} - }} - - [UnscopedRef] - public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B - {{ - get - {{ - return ref Anonymous.Anonymous.B; - }} - }} - - public partial struct _Anonymous_e__Struct - {{ - [NativeTypeName(""long"")] - public nint First; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - {{ - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L9_C13"")] - public _A_e__Struct A; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C13"")] - public _B_e__Struct B; - - public partial struct _A_e__Struct - {{ - [NativeTypeName(""long"")] - public nint Second; - }} - - public partial struct _B_e__Struct - {{ - [NativeTypeName(""long"")] - public nint Second; - }} - }} - }} - - [InlineArray(2)] - public partial struct _AsArray_e__FixedBuffer - {{ - public nint e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/VarDeclarationTest.cs deleted file mode 100644 index c72f00c1..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestUnix/VarDeclarationTest.cs +++ /dev/null @@ -1,400 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpLatestUnix_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""{nativeType}"")] - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const GUID"")] - public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); - }} -}} -"; - - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 {nativeValue}"")] - public const {expectedManagedType} MyMacro1 = {expectedManagedValue}; - - [NativeTypeName(""#define MyMacro2 MyMacro1"")] - public const {expectedManagedType} MyMacro2 = {expectedManagedValue}; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 0 + \\\n1"")] - public const int MyMacro1 = 0 + 1; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 \""Test\0\\\r\n\t\""\"""")] - public static ReadOnlySpan MyMacro1 => ""Test\0\\\r\n\t\""""u8; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 u\""Test\0\\\r\n\t\""\"""")] - public const string MyMacro1 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public static ReadOnlySpan MyConst1 => [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000]; - - [NativeTypeName(""const wchar_t *"")] - public static uint[] MyConst2 = [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000]; - - [NativeTypeName(""const wchar_t *const"")] - public static ReadOnlySpan MyConst3 => [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000]; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => ""Test\0\\\r\n\t\""""u8; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = ""Test\0\\\r\n\t\""""u8.ToArray(); - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => ""Test\0\\\r\n\t\""""u8; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public static readonly uint[] MyConst1 = new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }}; - - [NativeTypeName(""const wchar_t *"")] - public static uint[] MyConst2 = new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }}; - - [NativeTypeName(""const wchar_t *const"")] - public static readonly uint[] MyConst3 = new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }}; - }} -}} -"; - - return ValidateGeneratedCSharpCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => ""Test\0\\\r\n\t\""""u8; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = ""Test\0\\\r\n\t\""""u8.ToArray(); - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => ""Test\0\\\r\n\t\""""u8; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 (long)0x80000000L"")] - public const nint MyMacro1 = unchecked((nint)(0x80000000)); - - [NativeTypeName(""#define MyMacro2 (int)0x80000000"")] - public const int MyMacro2 = unchecked((int)(0x80000000)); - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 unsigned(-1)"")] - public const uint MyMacro1 = unchecked((uint)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro3 MyMacro2(3)"")] - public const int MyMacro3 = unchecked((int)(((nuint)(1) << 31) | ((nuint)(2) << 16) | ((nuint)(3)))); - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 ((int*) -1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 reinterpret_cast(-1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const int[2][2]"")] - public static readonly int[][] MyArray = new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }}; - }} -}} -"; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"")] - public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); - }} -}} -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/CXXMethodDeclarationTest.cs deleted file mode 100644 index e37b13e8..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,950 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpLatestWindows_CXXMethodDeclarationTest : 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 ValidateGeneratedCSharpLatestWindowsBindingsAsync(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 ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public int value; - - public int ToInt32() - { - return value; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - - var entryPoint = Environment.Is64BitProcess ? "?DoWork@?$MyTemplate@H@@QEAAPEAHPEAH@Z" : "?DoWork@?$MyTemplate@H@@QEAPEHPEH@Z"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [NativeTypeName(""struct MyStruct : MyTemplate"")] - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern int* DoWork(MyStruct* pThis, int* value = null); - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public void Dispose() - { - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = Environment.Is64BitProcess - ? "?MyVoidMethod@MyStruct@@QEAAXXZ" - : "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(MyStruct* pThis); - - public int MyInt32Method() - {{ - return 0; - }} - - public void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(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 ValidateGeneratedCSharpLatestWindowsBindingsAsync(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 ValidateGeneratedCSharpLatestWindowsBindingsAsync(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 ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@"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); - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new delegate* unmanaged[Thiscall] GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType1; - - [NativeTypeName(""int (int){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new delegate* unmanaged[Thiscall] GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType1; - - [NativeTypeName(""int (int){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedCSharpLatestWindowsBindingsAsync(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 ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(); - - public static int MyInt32Method() - {{ - return 0; - }} - - public static void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(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 ValidateGeneratedCSharpLatestWindowsBindingsAsync(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 ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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)); - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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)); - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/DeprecatedToObsoleteTest.cs deleted file mode 100644 index dfd968ac..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,506 +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; - -[Platform("win")] -public sealed class CSharpLatestWindows_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - [Obsolete] - MyEnum_Value1, - [Obsolete(""This is obsolete."")] - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"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, - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable0 = 0; - - [Obsolete] - public static {expectedManagedType} MyVariable1 = 0; - - [Obsolete(""This is obsolete."")] - public static {expectedManagedType} MyVariable2 = 0; - - public static {expectedManagedType} MyVariable3 = 0; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @"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() - { - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@"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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @"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(); - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/EnumDeclarationTest.cs deleted file mode 100644 index 86a75eb2..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/EnumDeclarationTest.cs +++ /dev/null @@ -1,611 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpLatestWindows_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - [NativeTypeName(""{nativeType}"")] - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum1 : int -{ - MyEnum1_Value1, - MyEnum1_Value2, - MyEnum1_Value3, -} MyEnum1; - -namespace Namespace1 -{ - namespace Namespace2 - { - typedef enum _MyEnum2 : int - { - MyEnum2_Value1, - MyEnum2_Value2, - MyEnum2_Value3, - } MyEnum2; - - typedef enum _MyEnum3 : int - { - MyEnum3_Value1, - MyEnum3_Value2, - MyEnum3_Value3, - } MyEnum3; - - typedef enum _MyEnum4 : int - { - MyEnum4_Value1, - MyEnum4_Value2, - MyEnum4_Value3, - } MyEnum4; - } -} -"; - - var expectedOutputContents = @"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, - } -} -"; - - var remappedNames = new Dictionary { ["_MyEnum1"] = "MyEnum1", ["Namespace1.Namespace2._MyEnum2"] = "MyEnum2", ["_MyEnum3"] = "MyEnum3", ["Namespace1::Namespace2::_MyEnum4"] = "MyEnum4" }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - [Flags] - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = 1, - } -} -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using System; -using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0 = (int)(MyEnum)(10), - MyEnum_Value1 = (int)(MyEnum)(MyEnum_Value0), - MyEnum_Value2 = ((int)(MyEnum)(10)) + MyEnum_Value1, - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @"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), - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = unchecked((int)(0x80000000)), - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, - } -} -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum1 : uint - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - 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, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @"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; - } -} -"; - 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, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index 623eae4f..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,1781 +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; - -[Platform("win")] -public sealed class CSharpLatestWindows_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* pData, int index) - { - return pData[index]; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(bool x, bool y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - break; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction() - { - } - - public static void MyFunction() - { - MyCalledFunction(); - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction(int x, int y) - { - } - - public static void MyFunction() - { - MyCalledFunction(0, 1); - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - return condition ? lhs : rhs; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - continue; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction([NativeTypeName(""const void *"")] void* input) - { - return input; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@"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); - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - int x = 0; - int y = 1, z = 2; - - return x + y + z; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - if (condition) - { - return lhs; - } - - return rhs; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction() - { - return null; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static double MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static float MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - return; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - return -1; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(int value) - { - return &value; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* value) - { - return *value; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static bool MyFunction(bool value) - { - return !value; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return value{opcode}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return {opcode}value; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index 522c1ff5..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,428 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpLatestWindows_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyFunction(); - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@"{expectedUsingStatement}using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeAttr ? $@"[NativeTypeName(""MyTemplate<{nativeType}>"")] " : "")}MyTemplate<{expectedManagedType}> myStruct); - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTemplate"")] - public MyTemplate a; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport("""", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeNameAttr ? $@"[NativeTypeName(""{nativeType}"")] " : "")}{expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"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({expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(int value, ...);"; - - const string ExpectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionPointerDeclarationTest.cs deleted file mode 100644 index 85e996ae..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,76 +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; - -[Platform("win")] -public sealed class CSharpLatestWindows_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback"")] - public delegate* unmanaged[Cdecl] _callback; - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback"")] - public delegate* unmanaged[Stdcall] _callback; - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback *"")] - public delegate* unmanaged[Cdecl] _callback; - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/StructDeclarationTest.cs deleted file mode 100644 index b54c00f2..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/StructDeclarationTest.cs +++ /dev/null @@ -1,1966 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpLatestWindows_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[]"")] - public _x_e__FixedBuffer x; - - public partial struct _x_e__FixedBuffer - {{ - public {expectedManagedType} e0; - - [UnscopedRef] - public ref {expectedManagedType} this[int index] - {{ - get - {{ - return ref Unsafe.Add(ref e0, index); - }} - }} - - [UnscopedRef] - public Span<{expectedManagedType}> AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length); - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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); - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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); - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @"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(); - } -} -"; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - public partial struct MyOtherStruct - {{ - [NativeTypeName(""MyStruct[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public MyStruct e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - public partial struct MyOtherStruct - {{ - [NativeTypeName(""MyBuffer"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public MyStruct e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} value; - }} - - public partial struct MyOtherStruct - {{ - [NativeTypeName(""MyStruct[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public MyStruct e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public _c_e__FixedBuffer c; - - [InlineArray(2 * 1 * 3 * 4)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0_0_0_0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"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 {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - struct - {{ - {nativeType} value1; - - struct - {{ - {nativeType} value; - }}; - }}; - - union - {{ - {nativeType} value2; - }}; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"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 {expectedManagedType} value; - }} - - public partial struct MyStruct - {{ - public {expectedManagedType} x; - - public {expectedManagedType} y; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Struct Anonymous; - - [UnscopedRef] - public ref {expectedManagedType} z - {{ - get - {{ - return ref Anonymous.z; - }} - }} - - [UnscopedRef] - public ref _Anonymous_e__Struct._w_e__Struct w - {{ - get - {{ - return ref Anonymous.w; - }} - }} - - [UnscopedRef] - public ref {expectedManagedType} value1 - {{ - get - {{ - return ref Anonymous.Anonymous1.value1; - }} - }} - - [UnscopedRef] - public ref {expectedManagedType} value - {{ - get - {{ - return ref Anonymous.Anonymous1.Anonymous.value; - }} - }} - - [UnscopedRef] - public ref {expectedManagedType} value2 - {{ - get - {{ - return ref Anonymous.Anonymous2.value2; - }} - }} - - [UnscopedRef] - public ref MyUnion u - {{ - get - {{ - return ref Anonymous.u; - }} - }} - - [UnscopedRef] - public Span<{expectedManagedType}> buffer1 - {{ - get - {{ - return Anonymous.buffer1; - }} - }} - - [UnscopedRef] - public Span buffer2 - {{ - get - {{ - return Anonymous.buffer2; - }} - }} - - public partial struct _Anonymous_e__Struct - {{ - public {expectedManagedType} 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(""{nativeType}[4]"")] - public _buffer1_e__FixedBuffer buffer1; - - [NativeTypeName(""MyUnion[4]"")] - public _buffer2_e__FixedBuffer buffer2; - - public partial struct _w_e__Struct - {{ - public {expectedManagedType} value; - }} - - public partial struct _Anonymous1_e__Struct - {{ - public {expectedManagedType} value1; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_e__Struct - {{ - public {expectedManagedType} value; - }} - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous2_e__Union - {{ - [FieldOffset(0)] - public {expectedManagedType} value2; - }} - - [InlineArray(4)] - public partial struct _buffer1_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - - [InlineArray(4)] - public partial struct _buffer2_e__FixedBuffer - {{ - public MyUnion e0; - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"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.Anonymous.w; - } - } - - public int o0_b0_16 - { - readonly get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - readonly get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - public partial struct _Anonymous_e__Struct - { - public int z; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var usingStatement = "using System.Runtime.InteropServices;\n\n"; - var packing = " [StructLayout(LayoutKind.Sequential, Pack = 4)]\n"; - - if (!Environment.Is64BitProcess) - { - usingStatement = string.Empty; - packing = string.Empty; - } - - var expectedOutputContents = $@"{usingStatement}namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct1 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} - -{packing} public unsafe partial struct MyStruct2 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - [NativeTypeName(""example_t *"")] - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @"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; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct1A - { - public void MyMethod() - { - } - } - - [NativeTypeName(""struct MyStruct1B : MyStruct1A"")] - public partial struct MyStruct1B - { - public void MyMethod() - { - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @"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; - } - } -} -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/UnionDeclarationTest.cs deleted file mode 100644 index 4e6b0ffc..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/UnionDeclarationTest.cs +++ /dev/null @@ -1,1519 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpLatestWindows_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ", Pack = 1" : ""; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit{expectedPack})] - 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{expectedPack})] - 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); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public _c_e__FixedBuffer c; - - [InlineArray(2 * 1 * 3 * 4)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0_0_0_0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"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 {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Union Anonymous; - - [UnscopedRef] - public ref {expectedManagedType} a - {{ - get - {{ - return ref Anonymous.a; - }} - }} - - [UnscopedRef] - public ref MyStruct s - {{ - get - {{ - return ref Anonymous.s; - }} - }} - - [UnscopedRef] - public Span<{expectedManagedType}> buffer - {{ - get - {{ - return Anonymous.buffer; - }} - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - {{ - [FieldOffset(0)] - public {expectedManagedType} a; - - [FieldOffset(0)] - public MyStruct s; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[4]"")] - public _buffer_e__FixedBuffer buffer; - - [InlineArray(4)] - public partial struct _buffer_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - { - [FieldOffset(0)] - public int x; - - [FieldOffset(0)] - public int y; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] - public _Anonymous_e__Union Anonymous; - - [UnscopedRef] - public ref int z - { - get - { - return ref Anonymous.z; - } - } - - [UnscopedRef] - public ref int w - { - get - { - return ref Anonymous.Anonymous.w; - } - } - - public int o0_b0_16 - { - readonly get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - readonly get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int z; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int w; - - [FieldOffset(0)] - 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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public new int Equals; - - [FieldOffset(0)] - public int Dispose; - - [FieldOffset(0)] - public new int GetHashCode; - - [FieldOffset(0)] - public new int GetType; - - [FieldOffset(0)] - public new int MemberwiseClone; - - [FieldOffset(0)] - public new int ReferenceEquals; - - [FieldOffset(0)] - public new int ToString; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - [NativeTypeName(""example_t *"")] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @"using System.Diagnostics.CodeAnalysis; -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; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] - public _Anonymous_e__Union Anonymous; - - [UnscopedRef] - public ref double a - { - get - { - return ref Anonymous.a; - } - } - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public double a; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - { - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@"using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct _MY_UNION - {{ - [FieldOffset(0)] - [NativeTypeName(""long[2]"")] - public _AsArray_e__FixedBuffer AsArray; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L4_C5"")] - public _Anonymous_e__Struct Anonymous; - - [UnscopedRef] - public ref int First - {{ - get - {{ - return ref Anonymous.First; - }} - }} - - [UnscopedRef] - public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A - {{ - get - {{ - return ref Anonymous.Anonymous.A; - }} - }} - - [UnscopedRef] - public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B - {{ - get - {{ - return ref Anonymous.Anonymous.B; - }} - }} - - public partial struct _Anonymous_e__Struct - {{ - [NativeTypeName(""long"")] - public int First; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - {{ - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L9_C13"")] - public _A_e__Struct A; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C13"")] - public _B_e__Struct B; - - public partial struct _A_e__Struct - {{ - [NativeTypeName(""long"")] - public int Second; - }} - - public partial struct _B_e__Struct - {{ - [NativeTypeName(""long"")] - public int Second; - }} - }} - }} - - [InlineArray(2)] - public partial struct _AsArray_e__FixedBuffer - {{ - public int e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/VarDeclarationTest.cs deleted file mode 100644 index cc9e2428..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpLatestWindows/VarDeclarationTest.cs +++ /dev/null @@ -1,398 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpLatestWindows_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""{nativeType}"")] - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const GUID"")] - public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); - }} -}} -"; - - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 {nativeValue}"")] - public const {expectedManagedType} MyMacro1 = {expectedManagedValue}; - - [NativeTypeName(""#define MyMacro2 MyMacro1"")] - public const {expectedManagedType} MyMacro2 = {expectedManagedValue}; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 0 + \\\n1"")] - public const int MyMacro1 = 0 + 1; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 \""Test\0\\\r\n\t\""\"""")] - public static ReadOnlySpan MyMacro1 => ""Test\0\\\r\n\t\""""u8; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 u\""Test\0\\\r\n\t\""\"""")] - public const string MyMacro1 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public const string MyConst1 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *"")] - public static string MyConst2 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *const"")] - public const string MyConst3 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => ""Test\0\\\r\n\t\""""u8; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = ""Test\0\\\r\n\t\""""u8.ToArray(); - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => ""Test\0\\\r\n\t\""""u8; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public const string MyConst1 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *"")] - public static string MyConst2 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *const"")] - public const string MyConst3 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => ""Test\0\\\r\n\t\""""u8; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = ""Test\0\\\r\n\t\""""u8.ToArray(); - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => ""Test\0\\\r\n\t\""""u8; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 (long)0x80000000L"")] - public const int MyMacro1 = unchecked((int)(0x80000000)); - - [NativeTypeName(""#define MyMacro2 (int)0x80000000"")] - public const int MyMacro2 = unchecked((int)(0x80000000)); - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 unsigned(-1)"")] - public const uint MyMacro1 = unchecked((uint)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro3 MyMacro2(3)"")] - public const int MyMacro3 = unchecked((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))); - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 ((int*) -1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 reinterpret_cast(-1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const int[2][2]"")] - public static readonly int[][] MyArray = new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }}; - }} -}} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"")] - public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); - }} -}} -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/CXXMethodDeclarationTest.cs deleted file mode 100644 index e9f3cb58..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,950 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpPreviewUnix_CXXMethodDeclarationTest : 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 ValidateGeneratedCSharpPreviewUnixBindingsAsync(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 ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public int value; - - public int ToInt32() - { - return value; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8$MyTemplateDoWorkEv" : "_ZN10MyTemplateIiE6DoWorkEPi"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [NativeTypeName(""struct MyStruct : MyTemplate"")] - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern int* DoWork(MyStruct* pThis, int* value = null); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public void Dispose() - { - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = Environment.Is64BitProcess - ? "?MyVoidMethod@MyStruct@@QEAAXXZ" - : "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(MyStruct* pThis); - - public int MyInt32Method() - {{ - return 0; - }} - - public void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(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 ValidateGeneratedCSharpPreviewUnixBindingsAsync(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 ValidateGeneratedCSharpPreviewUnixBindingsAsync(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 ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@"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); - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new delegate* unmanaged[Thiscall] GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType1; - - [NativeTypeName(""int (int, int){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new delegate* unmanaged[Thiscall] GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType1; - - [NativeTypeName(""int (int, int){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedCSharpPreviewUnixBindingsAsync(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 ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(); - - public static int MyInt32Method() - {{ - return 0; - }} - - public static void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(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 ValidateGeneratedCSharpPreviewUnixBindingsAsync(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 ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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)); - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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)); - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/DeprecatedToObsoleteTest.cs deleted file mode 100644 index 335c8a5c..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,506 +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; - -[Platform("unix")] -public sealed class CSharpPreviewUnix_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - [Obsolete] - MyEnum_Value1, - [Obsolete(""This is obsolete."")] - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"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, - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable0 = 0; - - [Obsolete] - public static {expectedManagedType} MyVariable1 = 0; - - [Obsolete(""This is obsolete."")] - public static {expectedManagedType} MyVariable2 = 0; - - public static {expectedManagedType} MyVariable3 = 0; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @"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() - { - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@"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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @"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(); - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/EnumDeclarationTest.cs deleted file mode 100644 index 374662e5..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/EnumDeclarationTest.cs +++ /dev/null @@ -1,611 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpPreviewUnix_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - [NativeTypeName(""{nativeType}"")] - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum1 : int -{ - MyEnum1_Value1, - MyEnum1_Value2, - MyEnum1_Value3, -} MyEnum1; - -namespace Namespace1 -{ - namespace Namespace2 - { - typedef enum _MyEnum2 : int - { - MyEnum2_Value1, - MyEnum2_Value2, - MyEnum2_Value3, - } MyEnum2; - - typedef enum _MyEnum3 : int - { - MyEnum3_Value1, - MyEnum3_Value2, - MyEnum3_Value3, - } MyEnum3; - - typedef enum _MyEnum4 : int - { - MyEnum4_Value1, - MyEnum4_Value2, - MyEnum4_Value3, - } MyEnum4; - } -} -"; - - var expectedOutputContents = @"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, - } -} -"; - - var remappedNames = new Dictionary { ["_MyEnum1"] = "MyEnum1", ["Namespace1.Namespace2._MyEnum2"] = "MyEnum2", ["_MyEnum3"] = "MyEnum3", ["Namespace1::Namespace2::_MyEnum4"] = "MyEnum4" }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - [Flags] - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = 1, - } -} -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using System; -using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0 = (int)(MyEnum)(10), - MyEnum_Value1 = (int)(MyEnum)(MyEnum_Value0), - MyEnum_Value2 = ((int)(MyEnum)(10)) + MyEnum_Value1, - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @"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), - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = unchecked((int)(0x80000000)), - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, - } -} -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum1 : uint - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - 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 ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @"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; - } -} -"; - 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 ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index 7c0507bb..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,1781 +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; - -[Platform("unix")] -public sealed class CSharpPreviewUnix_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* pData, int index) - { - return pData[index]; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(bool x, bool y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - break; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction() - { - } - - public static void MyFunction() - { - MyCalledFunction(); - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction(int x, int y) - { - } - - public static void MyFunction() - { - MyCalledFunction(0, 1); - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - return condition ? lhs : rhs; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - continue; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction([NativeTypeName(""const void *"")] void* input) - { - return input; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@"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); - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - int x = 0; - int y = 1, z = 2; - - return x + y + z; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - if (condition) - { - return lhs; - } - - return rhs; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction() - { - return null; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static double MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static float MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - return; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - return -1; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(int value) - { - return &value; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* value) - { - return *value; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static bool MyFunction(bool value) - { - return !value; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return value{opcode}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return {opcode}value; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index 98c598ff..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,411 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpPreviewUnix_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyFunction(); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@"{expectedUsingStatement}using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeAttr ? $@"[NativeTypeName(""MyTemplate<{nativeType}>"")] " : "")}MyTemplate<{expectedManagedType}> myStruct); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTemplate"")] - public MyTemplate a; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport("""", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeNameAttr ? $@"[NativeTypeName(""{nativeType}"")] " : "")}{expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"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({expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() => Task.CompletedTask; - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionPointerDeclarationTest.cs deleted file mode 100644 index b37a7dc9..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,76 +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; - -[Platform("unix")] -public sealed class CSharpPreviewUnix_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback"")] - public delegate* unmanaged[Cdecl] _callback; - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback"")] - public delegate* unmanaged[Stdcall] _callback; - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback *"")] - public delegate* unmanaged[Cdecl] _callback; - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/StructDeclarationTest.cs deleted file mode 100644 index fb7cf492..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/StructDeclarationTest.cs +++ /dev/null @@ -1,1960 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpPreviewUnix_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[]"")] - public _x_e__FixedBuffer x; - - public partial struct _x_e__FixedBuffer - {{ - public {expectedManagedType} e0; - - [UnscopedRef] - public ref {expectedManagedType} this[int index] - {{ - get - {{ - return ref Unsafe.Add(ref e0, index); - }} - }} - - [UnscopedRef] - public Span<{expectedManagedType}> AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length); - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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 o4_b22_1 - { - readonly get - { - return (byte)((_bitfield2 >> 22) & 0x1u); - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b23_1 - { - readonly get - { - return (int)(_bitfield2 << 8) >> 31; - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b24_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); - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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(""o4_b22_1"", offset: 22, length: 1)] - [NativeBitfield(""o4_b23_1"", offset: 23, length: 1)] - [NativeBitfield(""o4_b24_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 o4_b22_1 - { - readonly get - { - return (byte)((_bitfield2 >> 22) & 0x1u); - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b23_1 - { - readonly get - { - return (int)(_bitfield2 << 8) >> 31; - } - - set - { - _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23); - } - } - - [NativeTypeName(""int : 1"")] - public int o4_b24_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); - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @"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(); - } -} -"; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - public partial struct MyOtherStruct - {{ - [NativeTypeName(""MyStruct[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public MyStruct e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - public partial struct MyOtherStruct - {{ - [NativeTypeName(""MyBuffer"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public MyStruct e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} value; - }} - - public partial struct MyOtherStruct - {{ - [NativeTypeName(""MyStruct[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public MyStruct e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public _c_e__FixedBuffer c; - - [InlineArray(2 * 1 * 3 * 4)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0_0_0_0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"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 {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - struct - {{ - {nativeType} value1; - - struct - {{ - {nativeType} value; - }}; - }}; - - union - {{ - {nativeType} value2; - }}; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"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 {expectedManagedType} value; - }} - - public partial struct MyStruct - {{ - public {expectedManagedType} x; - - public {expectedManagedType} y; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Struct Anonymous; - - [UnscopedRef] - public ref {expectedManagedType} z - {{ - get - {{ - return ref Anonymous.z; - }} - }} - - [UnscopedRef] - public ref _Anonymous_e__Struct._w_e__Struct w - {{ - get - {{ - return ref Anonymous.w; - }} - }} - - [UnscopedRef] - public ref {expectedManagedType} value1 - {{ - get - {{ - return ref Anonymous.Anonymous1.value1; - }} - }} - - [UnscopedRef] - public ref {expectedManagedType} value - {{ - get - {{ - return ref Anonymous.Anonymous1.Anonymous.value; - }} - }} - - [UnscopedRef] - public ref {expectedManagedType} value2 - {{ - get - {{ - return ref Anonymous.Anonymous2.value2; - }} - }} - - [UnscopedRef] - public ref MyUnion u - {{ - get - {{ - return ref Anonymous.u; - }} - }} - - [UnscopedRef] - public Span<{expectedManagedType}> buffer1 - {{ - get - {{ - return Anonymous.buffer1; - }} - }} - - [UnscopedRef] - public Span buffer2 - {{ - get - {{ - return Anonymous.buffer2; - }} - }} - - public partial struct _Anonymous_e__Struct - {{ - public {expectedManagedType} 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(""{nativeType}[4]"")] - public _buffer1_e__FixedBuffer buffer1; - - [NativeTypeName(""MyUnion[4]"")] - public _buffer2_e__FixedBuffer buffer2; - - public partial struct _w_e__Struct - {{ - public {expectedManagedType} value; - }} - - public partial struct _Anonymous1_e__Struct - {{ - public {expectedManagedType} value1; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_e__Struct - {{ - public {expectedManagedType} value; - }} - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous2_e__Union - {{ - [FieldOffset(0)] - public {expectedManagedType} value2; - }} - - [InlineArray(4)] - public partial struct _buffer1_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - - [InlineArray(4)] - public partial struct _buffer2_e__FixedBuffer - {{ - public MyUnion e0; - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"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.Anonymous.w; - } - } - - public int o0_b0_16 - { - readonly get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - readonly get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - public partial struct _Anonymous_e__Struct - { - public int z; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var usingStatement = "using System.Runtime.InteropServices;\n\n"; - var packing = " [StructLayout(LayoutKind.Sequential, Pack = 4)]\n"; - - if (!Environment.Is64BitProcess) - { - usingStatement = string.Empty; - packing = string.Empty; - } - - var expectedOutputContents = $@"{usingStatement}namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct1 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} - -{packing} public unsafe partial struct MyStruct2 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - [NativeTypeName(""example_t *"")] - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @"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; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct1A - { - public void MyMethod() - { - } - } - - [NativeTypeName(""struct MyStruct1B : MyStruct1A"")] - public partial struct MyStruct1B - { - public void MyMethod() - { - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"typedef int size_t; - -struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @"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; - } - } -} -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/UnionDeclarationTest.cs deleted file mode 100644 index 72774ebc..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/UnionDeclarationTest.cs +++ /dev/null @@ -1,1513 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpPreviewUnix_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ", Pack = 1" : ""; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit{expectedPack})] - 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 o4_b22_1 - {{ - readonly get - {{ - return (byte)((_bitfield2 >> 22) & 0x1u); - }} - - set - {{ - _bitfield2 = (_bitfield2 & ~(0x1u << 22)) | (uint)((value & 0x1u) << 22); - }} - }} - - [NativeTypeName(""int : 1"")] - public int o4_b23_1 - {{ - readonly get - {{ - return (int)(_bitfield2 << 8) >> 31; - }} - - set - {{ - _bitfield2 = (_bitfield2 & ~(0x1u << 23)) | (uint)((value & 0x1) << 23); - }} - }} - - [NativeTypeName(""int : 1"")] - public int o4_b24_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{expectedPack})] - 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); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public _c_e__FixedBuffer c; - - [InlineArray(2 * 1 * 3 * 4)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0_0_0_0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"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 {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Union Anonymous; - - [UnscopedRef] - public ref {expectedManagedType} a - {{ - get - {{ - return ref Anonymous.a; - }} - }} - - [UnscopedRef] - public ref MyStruct s - {{ - get - {{ - return ref Anonymous.s; - }} - }} - - [UnscopedRef] - public Span<{expectedManagedType}> buffer - {{ - get - {{ - return Anonymous.buffer; - }} - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - {{ - [FieldOffset(0)] - public {expectedManagedType} a; - - [FieldOffset(0)] - public MyStruct s; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[4]"")] - public _buffer_e__FixedBuffer buffer; - - [InlineArray(4)] - public partial struct _buffer_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - { - [FieldOffset(0)] - public int x; - - [FieldOffset(0)] - public int y; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] - public _Anonymous_e__Union Anonymous; - - [UnscopedRef] - public ref int z - { - get - { - return ref Anonymous.z; - } - } - - [UnscopedRef] - public ref int w - { - get - { - return ref Anonymous.Anonymous.w; - } - } - - public int o0_b0_16 - { - readonly get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - readonly get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int z; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int w; - - [FieldOffset(0)] - 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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public new int Equals; - - [FieldOffset(0)] - public int Dispose; - - [FieldOffset(0)] - public new int GetHashCode; - - [FieldOffset(0)] - public new int GetType; - - [FieldOffset(0)] - public new int MemberwiseClone; - - [FieldOffset(0)] - public new int ReferenceEquals; - - [FieldOffset(0)] - public new int ToString; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - [NativeTypeName(""example_t *"")] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @"using System.Diagnostics.CodeAnalysis; -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; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] - public _Anonymous_e__Union Anonymous; - - [UnscopedRef] - public ref double a - { - get - { - return ref Anonymous.a; - } - } - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public double a; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - { - } -} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@"using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct _MY_UNION - {{ - [FieldOffset(0)] - [NativeTypeName(""long[2]"")] - public _AsArray_e__FixedBuffer AsArray; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L4_C5"")] - public _Anonymous_e__Struct Anonymous; - - [UnscopedRef] - public ref nint First - {{ - get - {{ - return ref Anonymous.First; - }} - }} - - [UnscopedRef] - public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A - {{ - get - {{ - return ref Anonymous.Anonymous.A; - }} - }} - - [UnscopedRef] - public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B - {{ - get - {{ - return ref Anonymous.Anonymous.B; - }} - }} - - public partial struct _Anonymous_e__Struct - {{ - [NativeTypeName(""long"")] - public nint First; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - {{ - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L9_C13"")] - public _A_e__Struct A; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C13"")] - public _B_e__Struct B; - - public partial struct _A_e__Struct - {{ - [NativeTypeName(""long"")] - public nint Second; - }} - - public partial struct _B_e__Struct - {{ - [NativeTypeName(""long"")] - public nint Second; - }} - }} - }} - - [InlineArray(2)] - public partial struct _AsArray_e__FixedBuffer - {{ - public nint e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/VarDeclarationTest.cs deleted file mode 100644 index 0ab01dfb..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewUnix/VarDeclarationTest.cs +++ /dev/null @@ -1,402 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class CSharpPreviewUnix_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""{nativeType}"")] - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const GUID"")] - public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); - }} -}} -"; - - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 {nativeValue}"")] - public const {expectedManagedType} MyMacro1 = {expectedManagedValue}; - - [NativeTypeName(""#define MyMacro2 MyMacro1"")] - public const {expectedManagedType} MyMacro2 = {expectedManagedValue}; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 0 + \\\n1"")] - public const int MyMacro1 = 0 + 1; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 \""Test\0\\\r\n\t\""\"""")] - public static ReadOnlySpan MyMacro1 => ""Test\0\\\r\n\t\""""u8; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 u\""Test\0\\\r\n\t\""\"""")] - public const string MyMacro1 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public static ReadOnlySpan MyConst1 => [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000]; - - [NativeTypeName(""const wchar_t *"")] - public static uint[] MyConst2 = [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000]; - - [NativeTypeName(""const wchar_t *const"")] - public static ReadOnlySpan MyConst3 => [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000]; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => ""Test\0\\\r\n\t\""""u8; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = ""Test\0\\\r\n\t\""""u8.ToArray(); - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => ""Test\0\\\r\n\t\""""u8; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public static ReadOnlySpan MyConst1 => [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000]; - - [NativeTypeName(""const wchar_t *"")] - public static uint[] MyConst2 = [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000]; - - [NativeTypeName(""const wchar_t *const"")] - public static ReadOnlySpan MyConst3 => [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000]; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => ""Test\0\\\r\n\t\""""u8; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = ""Test\0\\\r\n\t\""""u8.ToArray(); - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => ""Test\0\\\r\n\t\""""u8; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 (long)0x80000000L"")] - public const nint MyMacro1 = unchecked((nint)(0x80000000)); - - [NativeTypeName(""#define MyMacro2 (int)0x80000000"")] - public const int MyMacro2 = unchecked((int)(0x80000000)); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 unsigned(-1)"")] - public const uint MyMacro1 = unchecked((uint)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro3 MyMacro2(3)"")] - public const int MyMacro3 = unchecked((int)(((nuint)(1) << 31) | ((nuint)(2) << 16) | ((nuint)(3)))); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 ((int*) -1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 reinterpret_cast(-1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const int[2][2]"")] - public static readonly int[][] MyArray = new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }}; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"")] - public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); - }} -}} -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedCSharpPreviewUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/CXXMethodDeclarationTest.cs deleted file mode 100644 index 28f1de68..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,950 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpPreviewWindows_CXXMethodDeclarationTest : 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 ValidateGeneratedCSharpPreviewWindowsBindingsAsync(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 ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public int value; - - public int ToInt32() - { - return value; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - - var entryPoint = Environment.Is64BitProcess ? "?DoWork@?$MyTemplate@H@@QEAAPEAHPEAH@Z" : "?DoWork@?$MyTemplate@H@@QEAPEHPEH@Z"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [NativeTypeName(""struct MyStruct : MyTemplate"")] - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern int* DoWork(MyStruct* pThis, int* value = null); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - public void Dispose() - { - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = Environment.Is64BitProcess - ? "?MyVoidMethod@MyStruct@@QEAAXXZ" - : "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.ThisCall, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(MyStruct* pThis); - - public int MyInt32Method() - {{ - return 0; - }} - - public void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(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 ValidateGeneratedCSharpPreviewWindowsBindingsAsync(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 ValidateGeneratedCSharpPreviewWindowsBindingsAsync(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 ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@"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); - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new delegate* unmanaged[Thiscall] GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType1; - - [NativeTypeName(""int (int){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@"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){nativeCallConv}"")] - public new delegate* unmanaged[Thiscall] GetType; - - [NativeTypeName(""int (){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType1; - - [NativeTypeName(""int (int){nativeCallConv}"")] - public delegate* unmanaged[Thiscall] GetType2; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedCSharpPreviewWindowsBindingsAsync(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 ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyVoidMethod(); - - public static int MyInt32Method() - {{ - return 0; - }} - - public static void* MyVoidStarMethod() - {{ - return null; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(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 ValidateGeneratedCSharpPreviewWindowsBindingsAsync(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 ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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)); - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@"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(""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)); - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/DeprecatedToObsoleteTest.cs deleted file mode 100644 index b18e9ae2..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,506 +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; - -[Platform("win")] -public sealed class CSharpPreviewWindows_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - [Obsolete] - public {expectedManagedType} g; - - [Obsolete(""This is obsolete."")] - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} -}} -"; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - [Obsolete] - MyEnum_Value1, - [Obsolete(""This is obsolete."")] - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @"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, - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable0 = 0; - - [Obsolete] - public static {expectedManagedType} MyVariable1 = 0; - - [Obsolete(""This is obsolete."")] - public static {expectedManagedType} MyVariable2 = 0; - - public static {expectedManagedType} MyVariable3 = 0; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @"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() - { - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@"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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @"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(); - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/EnumDeclarationTest.cs deleted file mode 100644 index b1322b9f..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/EnumDeclarationTest.cs +++ /dev/null @@ -1,611 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpPreviewWindows_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - [NativeTypeName(""{nativeType}"")] - public enum MyEnum : {expectedManagedType} - {{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum1 : int -{ - MyEnum1_Value1, - MyEnum1_Value2, - MyEnum1_Value3, -} MyEnum1; - -namespace Namespace1 -{ - namespace Namespace2 - { - typedef enum _MyEnum2 : int - { - MyEnum2_Value1, - MyEnum2_Value2, - MyEnum2_Value3, - } MyEnum2; - - typedef enum _MyEnum3 : int - { - MyEnum3_Value1, - MyEnum3_Value2, - MyEnum3_Value3, - } MyEnum3; - - typedef enum _MyEnum4 : int - { - MyEnum4_Value1, - MyEnum4_Value2, - MyEnum4_Value3, - } MyEnum4; - } -} -"; - - var expectedOutputContents = @"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, - } -} -"; - - var remappedNames = new Dictionary { ["_MyEnum1"] = "MyEnum1", ["Namespace1.Namespace2._MyEnum2"] = "MyEnum2", ["_MyEnum3"] = "MyEnum3", ["Namespace1::Namespace2::_MyEnum4"] = "MyEnum4" }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @"using System; - -namespace ClangSharp.Test -{ - [Flags] - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = 1, - } -} -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"using System; -using static ClangSharp.Test.MyEnum1; - -namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value1 = 1, - } - - public enum MyEnum2 - { - MyEnum2_Value1 = MyEnum1_Value1, - } -} -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0 = (int)(MyEnum)(10), - MyEnum_Value1 = (int)(MyEnum)(MyEnum_Value0), - MyEnum_Value2 = ((int)(MyEnum)(10)) + MyEnum_Value1, - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @"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), - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = unchecked((int)(0x80000000)), - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } -} -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum : uint - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, - } -} -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - [NativeTypeName(""int"")] - public enum MyEnum1 : uint - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum1 - { - MyEnum1_Value0, - } - - [NativeTypeName(""int"")] - public enum MyEnum2 : uint - { - MyEnum2_Value0, - } -} -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - 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 ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @"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; - } -} -"; - 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 ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index d6502c71..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,1781 +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; - -[Platform("win")] -public sealed class CSharpPreviewWindows_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* pData, int index) - { - return pData[index]; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(int x, int y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction(bool x, bool y) - {{ - return x {opcode} y; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - break; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction() - { - } - - public static void MyFunction() - { - MyCalledFunction(); - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyCalledFunction(int x, int y) - { - } - - public static void MyFunction() - { - MyCalledFunction(0, 1); - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - return condition ? lhs : rhs; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - while (true) - { - continue; - } - - return 0; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(float input) - { - return (int)(input); - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction([NativeTypeName(""const void *"")] void* input) - { - return input; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@"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); - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(void* input) - { - return (int*)(input); - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - int x = 0; - int y = 1, z = 2; - - return x + y + z; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(bool condition, int lhs, int rhs) - { - if (condition) - { - return lhs; - } - - return rhs; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @"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; - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @"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, - }; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static void* MyFunction() - { - return null; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static bool MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static double MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static float MyFunction() - {{ - return {value}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static void MyFunction() - { - return; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction() - { - return -1; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @"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; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int value) - { - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int* MyFunction(int value) - { - return &value; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static unsafe partial class Methods - { - public static int MyFunction(int* value) - { - return *value; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static bool MyFunction(bool value) - { - return !value; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return value{opcode}; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static int MyFunction(int value) - {{ - return {opcode}value; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public static partial class Methods - { - public static int MyFunction(int count) - { - int i = 0; - - while (i < count) - { - i++; - } - - return i; - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index 2ebba7ad..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,428 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpPreviewWindows_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, EntryPoint = ""{entryPoint}"", ExactSpelling = true)] - public static extern void MyFunction(); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@"{expectedUsingStatement}using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeAttr ? $@"[NativeTypeName(""MyTemplate<{nativeType}>"")] " : "")}MyTemplate<{expectedManagedType}> myStruct); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTemplate"")] - public MyTemplate a; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport("""", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - public static partial class Methods - { - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction(); - } -} -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [DllImport(""ClangSharpPInvokeGenerator"", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void MyFunction({(expectedNativeTypeNameAttr ? $@"[NativeTypeName(""{nativeType}"")] " : "")}{expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@"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({expectedManagedType} value = {expectedManagedInit}); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @"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); - } -} -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(int value, ...);"; - - const string ExpectedOutputContents = @"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); - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionPointerDeclarationTest.cs deleted file mode 100644 index 35e7a5c2..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,76 +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; - -[Platform("win")] -public sealed class CSharpPreviewWindows_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback"")] - public delegate* unmanaged[Cdecl] _callback; - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback"")] - public delegate* unmanaged[Stdcall] _callback; - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public unsafe partial struct MyStruct - { - [NativeTypeName(""Callback *"")] - public delegate* unmanaged[Cdecl] _callback; - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/StructDeclarationTest.cs deleted file mode 100644 index 8299bd09..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/StructDeclarationTest.cs +++ /dev/null @@ -1,1966 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpPreviewWindows_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[]"")] - public _x_e__FixedBuffer x; - - public partial struct _x_e__FixedBuffer - {{ - public {expectedManagedType} e0; - - [UnscopedRef] - public ref {expectedManagedType} this[int index] - {{ - get - {{ - return ref Unsafe.Add(ref e0, index); - }} - }} - - [UnscopedRef] - public Span<{expectedManagedType}> AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length); - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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); - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @"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); - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @"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(); - } -} -"; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - public partial struct MyOtherStruct - {{ - [NativeTypeName(""MyStruct[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public MyStruct e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - public partial struct MyOtherStruct - {{ - [NativeTypeName(""MyBuffer"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public MyStruct e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} value; - }} - - public partial struct MyOtherStruct - {{ - [NativeTypeName(""MyStruct[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public MyStruct e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public _c_e__FixedBuffer c; - - [InlineArray(2 * 1 * 3 * 4)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0_0_0_0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"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 {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - struct - {{ - {nativeType} value1; - - struct - {{ - {nativeType} value; - }}; - }}; - - union - {{ - {nativeType} value2; - }}; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"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 {expectedManagedType} value; - }} - - public partial struct MyStruct - {{ - public {expectedManagedType} x; - - public {expectedManagedType} y; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Struct Anonymous; - - [UnscopedRef] - public ref {expectedManagedType} z - {{ - get - {{ - return ref Anonymous.z; - }} - }} - - [UnscopedRef] - public ref _Anonymous_e__Struct._w_e__Struct w - {{ - get - {{ - return ref Anonymous.w; - }} - }} - - [UnscopedRef] - public ref {expectedManagedType} value1 - {{ - get - {{ - return ref Anonymous.Anonymous1.value1; - }} - }} - - [UnscopedRef] - public ref {expectedManagedType} value - {{ - get - {{ - return ref Anonymous.Anonymous1.Anonymous.value; - }} - }} - - [UnscopedRef] - public ref {expectedManagedType} value2 - {{ - get - {{ - return ref Anonymous.Anonymous2.value2; - }} - }} - - [UnscopedRef] - public ref MyUnion u - {{ - get - {{ - return ref Anonymous.u; - }} - }} - - [UnscopedRef] - public Span<{expectedManagedType}> buffer1 - {{ - get - {{ - return Anonymous.buffer1; - }} - }} - - [UnscopedRef] - public Span buffer2 - {{ - get - {{ - return Anonymous.buffer2; - }} - }} - - public partial struct _Anonymous_e__Struct - {{ - public {expectedManagedType} 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(""{nativeType}[4]"")] - public _buffer1_e__FixedBuffer buffer1; - - [NativeTypeName(""MyUnion[4]"")] - public _buffer2_e__FixedBuffer buffer2; - - public partial struct _w_e__Struct - {{ - public {expectedManagedType} value; - }} - - public partial struct _Anonymous1_e__Struct - {{ - public {expectedManagedType} value1; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L23_C13"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_e__Struct - {{ - public {expectedManagedType} value; - }} - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous2_e__Union - {{ - [FieldOffset(0)] - public {expectedManagedType} value2; - }} - - [InlineArray(4)] - public partial struct _buffer1_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - - [InlineArray(4)] - public partial struct _buffer2_e__FixedBuffer - {{ - public MyUnion e0; - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"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.Anonymous.w; - } - } - - public int o0_b0_16 - { - readonly get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - readonly get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - public partial struct _Anonymous_e__Struct - { - public int z; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Struct Anonymous; - - public partial struct _Anonymous_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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - public partial struct MyNestedStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"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; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var usingStatement = "using System.Runtime.InteropServices;\n\n"; - var packing = " [StructLayout(LayoutKind.Sequential, Pack = 4)]\n"; - - if (!Environment.Is64BitProcess) - { - usingStatement = string.Empty; - packing = string.Empty; - } - - var expectedOutputContents = $@"{usingStatement}namespace ClangSharp.Test -{{ - public unsafe partial struct MyStruct1 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} - -{packing} public unsafe partial struct MyStruct2 - {{ - [NativeTypeName(""unsigned int"")] - public uint Field1; - - public void* Field2; - - [NativeTypeName(""unsigned int"")] - public uint Field3; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public unsafe partial struct example_s - {{ - [NativeTypeName(""example_t *"")] - public example_s* next; - - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @"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; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} r; - - public {expectedManagedType} g; - - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct - { - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @"namespace ClangSharp.Test -{ - public partial struct MyStruct1A - { - public void MyMethod() - { - } - } - - [NativeTypeName(""struct MyStruct1B : MyStruct1A"")] - public partial struct MyStruct1B - { - public void MyMethod() - { - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @"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; - } -} -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @"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; - } - } -} -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/UnionDeclarationTest.cs deleted file mode 100644 index e102e66c..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/UnionDeclarationTest.cs +++ /dev/null @@ -1,1519 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpPreviewWindows_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ", Pack = 1" : ""; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit{expectedPack})] - 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{expectedPack})] - 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); - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} 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; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - public unsafe partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - public {expectedManagedType} e1; - public {expectedManagedType} e2; - - public ref {expectedManagedType} this[int index] - {{ - get - {{ - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - }} - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[3]"")] - public _c_e__FixedBuffer c; - - [InlineArray(3)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[2][1][3][4]"")] - public _c_e__FixedBuffer c; - - [InlineArray(2 * 1 * 3 * 4)] - public partial struct _c_e__FixedBuffer - {{ - public {expectedManagedType} e0_0_0_0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@"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 {expectedManagedType} e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@"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); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@"using System; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - public partial struct MyStruct - {{ - public {expectedManagedType} value; - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L{line}_C{column}"")] - public _Anonymous_e__Union Anonymous; - - [UnscopedRef] - public ref {expectedManagedType} a - {{ - get - {{ - return ref Anonymous.a; - }} - }} - - [UnscopedRef] - public ref MyStruct s - {{ - get - {{ - return ref Anonymous.s; - }} - }} - - [UnscopedRef] - public Span<{expectedManagedType}> buffer - {{ - get - {{ - return Anonymous.buffer; - }} - }} - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - {{ - [FieldOffset(0)] - public {expectedManagedType} a; - - [FieldOffset(0)] - public MyStruct s; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}[4]"")] - public _buffer_e__FixedBuffer buffer; - - [InlineArray(4)] - public partial struct _buffer_e__FixedBuffer - {{ - public {expectedManagedType} e0; - }} - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @"using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - { - [FieldOffset(0)] - public int x; - - [FieldOffset(0)] - public int y; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L6_C5"")] - public _Anonymous_e__Union Anonymous; - - [UnscopedRef] - public ref int z - { - get - { - return ref Anonymous.z; - } - } - - [UnscopedRef] - public ref int w - { - get - { - return ref Anonymous.Anonymous.w; - } - } - - public int o0_b0_16 - { - readonly get - { - return Anonymous.Anonymous.o0_b0_16; - } - - set - { - Anonymous.Anonymous.o0_b0_16 = value; - } - } - - public int o0_b16_4 - { - readonly get - { - return Anonymous.Anonymous.o0_b16_4; - } - - set - { - Anonymous.Anonymous.o0_b16_4 = value; - } - } - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int z; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L10_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public int w; - - [FieldOffset(0)] - 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); - } - } - } - } - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - - [FieldOffset(0)] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [StructLayout(LayoutKind.Explicit)] - public partial struct MyNestedUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} a; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public new int Equals; - - [FieldOffset(0)] - public int Dispose; - - [FieldOffset(0)] - public new int GetHashCode; - - [FieldOffset(0)] - public new int GetType; - - [FieldOffset(0)] - public new int MemberwiseClone; - - [FieldOffset(0)] - public new int ReferenceEquals; - - [FieldOffset(0)] - public new int ToString; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public unsafe partial struct example_s - {{ - [FieldOffset(0)] - [NativeTypeName(""example_t *"")] - public example_s* next; - - [FieldOffset(0)] - public void* data; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - }} -}} -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @"using System.Diagnostics.CodeAnalysis; -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; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C5"")] - public _Anonymous_e__Union Anonymous; - - [UnscopedRef] - public ref double a - { - get - { - return ref Anonymous.a; - } - } - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - { - [FieldOffset(0)] - public double a; - } - } -} -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - public {expectedManagedType} r; - - [FieldOffset(0)] - public {expectedManagedType} g; - - [FieldOffset(0)] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - { - } -} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""{nativeType}"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@"using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct MyUnion - {{ - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} r; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} g; - - [FieldOffset(0)] - [NativeTypeName(""MyTypedefAlias"")] - public {expectedManagedType} b; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@"using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ClangSharp.Test -{{ - [StructLayout(LayoutKind.Explicit)] - public partial struct _MY_UNION - {{ - [FieldOffset(0)] - [NativeTypeName(""long[2]"")] - public _AsArray_e__FixedBuffer AsArray; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L4_C5"")] - public _Anonymous_e__Struct Anonymous; - - [UnscopedRef] - public ref int First - {{ - get - {{ - return ref Anonymous.First; - }} - }} - - [UnscopedRef] - public ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct A - {{ - get - {{ - return ref Anonymous.Anonymous.A; - }} - }} - - [UnscopedRef] - public ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct B - {{ - get - {{ - return ref Anonymous.Anonymous.B; - }} - }} - - public partial struct _Anonymous_e__Struct - {{ - [NativeTypeName(""long"")] - public int First; - - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L7_C9"")] - public _Anonymous_e__Union Anonymous; - - [StructLayout(LayoutKind.Explicit)] - public partial struct _Anonymous_e__Union - {{ - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L9_C13"")] - public _A_e__Struct A; - - [FieldOffset(0)] - [NativeTypeName(""__AnonymousRecord_ClangUnsavedFile_L14_C13"")] - public _B_e__Struct B; - - public partial struct _A_e__Struct - {{ - [NativeTypeName(""long"")] - public int Second; - }} - - public partial struct _B_e__Struct - {{ - [NativeTypeName(""long"")] - public int Second; - }} - }} - }} - - [InlineArray(2)] - public partial struct _AsArray_e__FixedBuffer - {{ - public int e0; - }} - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/VarDeclarationTest.cs deleted file mode 100644 index 714c18ed..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CSharpPreviewWindows/VarDeclarationTest.cs +++ /dev/null @@ -1,398 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class CSharpPreviewWindows_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""{nativeType}"")] - public static {expectedManagedType} MyVariable = 0; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const GUID"")] - public static readonly Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); - }} -}} -"; - - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 {nativeValue}"")] - public const {expectedManagedType} MyMacro1 = {expectedManagedValue}; - - [NativeTypeName(""#define MyMacro2 MyMacro1"")] - public const {expectedManagedType} MyMacro2 = {expectedManagedValue}; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 0 + \\\n1"")] - public const int MyMacro1 = 0 + 1; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 \""Test\0\\\r\n\t\""\"""")] - public static ReadOnlySpan MyMacro1 => ""Test\0\\\r\n\t\""""u8; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 u\""Test\0\\\r\n\t\""\"""")] - public const string MyMacro1 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public const string MyConst1 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *"")] - public static string MyConst2 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *const"")] - public const string MyConst3 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => ""Test\0\\\r\n\t\""""u8; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = ""Test\0\\\r\n\t\""""u8.ToArray(); - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => ""Test\0\\\r\n\t\""""u8; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const wchar_t[11]"")] - public const string MyConst1 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *"")] - public static string MyConst2 = ""Test\0\\\r\n\t\""""; - - [NativeTypeName(""const wchar_t *const"")] - public const string MyConst3 = ""Test\0\\\r\n\t\""""; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@"using System; - -namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const char[11]"")] - public static ReadOnlySpan MyConst1 => ""Test\0\\\r\n\t\""""u8; - - [NativeTypeName(""const char *"")] - public static byte[] MyConst2 = ""Test\0\\\r\n\t\""""u8.ToArray(); - - [NativeTypeName(""const char *const"")] - public static ReadOnlySpan MyConst3 => ""Test\0\\\r\n\t\""""u8; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 (long)0x80000000L"")] - public const int MyMacro1 = unchecked((int)(0x80000000)); - - [NativeTypeName(""#define MyMacro2 (int)0x80000000"")] - public const int MyMacro2 = unchecked((int)(0x80000000)); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro1 unsigned(-1)"")] - public const uint MyMacro1 = unchecked((uint)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define MyMacro3 MyMacro2(3)"")] - public const int MyMacro3 = unchecked((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 ((int*) -1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static unsafe partial class Methods - {{ - [NativeTypeName(""#define Macro1 reinterpret_cast(-1)"")] - public static readonly int* Macro1 = unchecked((int*)(-1)); - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""const int[2][2]"")] - public static readonly int[][] MyArray = new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }}; - }} -}} -"; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@"namespace ClangSharp.Test -{{ - public static partial class Methods - {{ - [NativeTypeName(""#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"")] - public const int ADDRESS_IN_USE = unchecked((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))); - }} -}} -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CTest.cs index ce250a46..1344df81 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/CTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CTest.cs @@ -1,13 +1,21 @@ // 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.Runtime.InteropServices; using System.Threading.Tasks; using NUnit.Framework; namespace ClangSharp.UnitTests; -public sealed class CTest : PInvokeGeneratorTest +public sealed class CTest() + : PInvokeGeneratorTest(PInvokeGeneratorOutputMode.CSharp, PInvokeGeneratorConfigurationOptions.GenerateLatestCode) { + private const string DefaultCStandard = "c17"; + + private static readonly string[] s_defaultCClangCommandLineArgs = + [ + $"-std={DefaultCStandard}", // The input files should be compiled for C 17 + "-xc", // The input files are C + ]; + [Test] public Task BasicTest() { @@ -21,49 +29,8 @@ typedef struct MyStruct { enum_t _field; } struct_t; "; - string expectedOutputContents; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - expectedOutputContents = @"namespace ClangSharp.Test -{ - public enum MyEnum - { - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, - } - - public partial struct MyStruct - { - [NativeTypeName(""enum_t"")] - public MyEnum _field; - } -} -"; - } - else - { - expectedOutputContents = @"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; - } -} -"; - } - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: DefaultCClangCommandLineArgs, language: "c", languageStandard: DefaultCStandard); + return ValidateGeneratedBindingsAsync(inputContents, commandLineArgs: s_defaultCClangCommandLineArgs, language: "c", languageStandard: DefaultCStandard); } [Test] @@ -83,60 +50,12 @@ enum { } field; }; "; - string expectedOutputContents; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - expectedOutputContents = @"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; - } -} -"; - } - else - { - expectedOutputContents = @"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; - } -} -"; - } 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"), new Diagnostic(DiagnosticLevel.Info, "Found anonymous enum: __AnonymousEnum_ClangUnsavedFile_L8_C5. Mapping values as constants in: Methods", "Line 8, Column 5 in ClangUnsavedFile.h") }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: DefaultCClangCommandLineArgs, expectedDiagnostics: diagnostics, language: "c", languageStandard: DefaultCStandard); + return ValidateGeneratedBindingsAsync(inputContents, commandLineArgs: s_defaultCClangCommandLineArgs, expectedDiagnostics: diagnostics, language: "c", languageStandard: DefaultCStandard); } [Test] @@ -168,53 +87,8 @@ typedef struct _MyStructWithAnonymousUnion } union1; } MyStructWithAnonymousUnion; "; - var expectedOutputContents = @"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; - } - } -} -"; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: DefaultCClangCommandLineArgs, language: "c", languageStandard: DefaultCStandard); + return ValidateGeneratedBindingsAsync(inputContents, commandLineArgs: s_defaultCClangCommandLineArgs, language: "c", languageStandard: DefaultCStandard); } [Test] @@ -231,31 +105,8 @@ typedef union _MyOtherUnion MyUnion* _field2; } MyOtherUnion; "; - var expectedOutputContents = @"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; - } -} -"; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: DefaultCClangCommandLineArgs, language: "c", languageStandard: DefaultCStandard); + return ValidateGeneratedBindingsAsync(inputContents, commandLineArgs: s_defaultCClangCommandLineArgs, language: "c", languageStandard: DefaultCStandard); } [Test] @@ -264,19 +115,6 @@ public Task MacroTest() var inputContents = @"#define MyMacro1 5 #define MyMacro2 MyMacro1"; - var expectedOutputContents = @"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; - } -} -"; - - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: DefaultCClangCommandLineArgs, language: "c", languageStandard: DefaultCStandard); + return ValidateGeneratedBindingsAsync(inputContents, commandLineArgs: s_defaultCClangCommandLineArgs, language: "c", languageStandard: DefaultCStandard); } } diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/CXXMethodDeclarationTest.cs new file mode 100644 index 00000000..3f3fea54 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/CXXMethodDeclarationTest.cs @@ -0,0 +1,423 @@ +// 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.Runtime.InteropServices; +using System.Threading.Tasks; +using NUnit.Framework; + +namespace ClangSharp.UnitTests; + +[TestFixtureSource(nameof(FixtureArgs))] +public sealed class CXXMethodDeclarationTest(PInvokeGeneratorOutputMode outputMode, PInvokeGeneratorConfigurationOptions outputVersion) + : PInvokeGeneratorTest(outputMode, outputVersion) +{ + [Test] + public Task ConstructorTest() + { + var inputContents = @"struct MyStruct +{ + int _value; + + MyStruct(int value) + { + _value = value; + } +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task ConstructorWithInitializeTest() + { + 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() + { + } +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task ConversionTest() + { + var inputContents = @"struct MyStruct +{ + int value; + + operator int() + { + return value; + } +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task DefaultParameterInheritedFromTemplateTest() + { + // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. + const string InputContents = @"template +struct MyTemplate +{ + int* DoWork(int* value = nullptr) + { + return value; + } +}; + +struct MyStruct : public MyTemplate +{}; +"; + + return ValidateGeneratedBindingsAsync(InputContents, osxTransform: (output) => output.Replace("__ZN10MyTemplateIiE6DoWorkEPi", "_ZN10MyTemplateIiE6DoWorkEPi", System.StringComparison.Ordinal)); + } + + [Test] + public Task DestructorTest() + { + var inputContents = @"struct MyStruct +{ + ~MyStruct() + { + } +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task InstanceTest() + { + var inputContents = @"struct MyStruct +{ + void MyVoidMethod(); + + int MyInt32Method() + { + return 0; + } + + void* MyVoidStarMethod() + { + return nullptr; + } +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents, osxTransform: (output) => output.Replace("__ZN8MyStruct12MyVoidMethodEv", "_ZN8MyStruct12MyVoidMethodEv", System.StringComparison.Ordinal)); + } + + [Test] + public Task MemberCallTest() + { + 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(); +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task MemberTest() + { + var inputContents = @"struct MyStruct +{ + int value; + + int MyFunction() + { + return value; + } +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task NewKeywordTest() + { + 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; } +};"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task NewKeywordVirtualTest() + { + var inputContents = @"struct MyStruct +{ + virtual int GetType(int obj) = 0; + virtual int GetType() = 0; + virtual int GetType(int objA, int objB) = 0; +};"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task NewKeywordVirtualWithExplicitVtblTest() + { + var inputContents = @"struct MyStruct +{ + virtual int GetType(int obj) = 0; + virtual int GetType() = 0; + virtual int GetType(int objA, int objB) = 0; +};"; + + return ValidateGeneratedBindingsAsync(inputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); + } + + [Test] + public Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTest() + { + var inputContents = @"struct MyStruct +{ + virtual int GetType(int obj) = 0; + virtual int GetType() = 0; + virtual int GetType(int objA, int objB) = 0; +};"; + + return ValidateGeneratedBindingsAsync(inputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); + } + + [Test] + public Task OperatorTest() + { + 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); +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task OperatorCallTest() + { + 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; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task StaticTest() + { + var inputContents = @"struct MyStruct +{ + static void MyVoidMethod(); + + static int MyInt32Method() + { + return 0; + } + + static void* MyVoidStarMethod() + { + return nullptr; + } +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents, osxTransform: (output) => output.Replace("__ZN8MyStruct12MyVoidMethodEv", "_ZN8MyStruct12MyVoidMethodEv", System.StringComparison.Ordinal)); + } + + [Test] + public Task ThisTest() + { + var inputContents = @"struct MyStruct +{ + int value; + + int MyFunction() + { + return this->value; + } +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task UnsafeDoesNotImpactDllImportTest() + { + var inputContents = @"struct MyStruct +{ + void* MyVoidStarMethod() + { + return nullptr; + } +}; + +extern ""C"" void MyFunction();"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task VirtualTest() + { + var inputContents = @"struct MyStruct +{ + virtual void MyVoidMethod() = 0; + + virtual char MyInt8Method() + { + return 0; + } + + virtual int MyInt32Method(); + + virtual void* MyVoidStarMethod() = 0; +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task VirtualWithVtblIndexAttributeTest() + { + var inputContents = @"struct MyStruct +{ + virtual void MyVoidMethod() = 0; + + virtual char MyInt8Method() + { + return 0; + } + + virtual int MyInt32Method(); + + virtual void* MyVoidStarMethod() = 0; +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); + } + + [Test] + public Task MacrosExpansionTest() + { + var inputContents = @"typedef struct +{ + unsigned char *buf; + int size; +} context_t; + +int buf_close(void *pContext) +{ + ((context_t*)pContext)->buf=0; + return 0; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/ClangSharp.PInvokeGenerator.UnitTests.csproj b/tests/ClangSharp.PInvokeGenerator.UnitTests/ClangSharp.PInvokeGenerator.UnitTests.csproj index cfdb757b..e61c40b8 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/ClangSharp.PInvokeGenerator.UnitTests.csproj +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/ClangSharp.PInvokeGenerator.UnitTests.csproj @@ -14,6 +14,8 @@ + + diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/DeprecatedToObsoleteTest.cs new file mode 100644 index 00000000..6cd71ee1 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/DeprecatedToObsoleteTest.cs @@ -0,0 +1,248 @@ +// 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; + +[TestFixtureSource(nameof(FixtureArgs))] +public sealed class DeprecatedToObsoleteTest(PInvokeGeneratorOutputMode outputMode, PInvokeGeneratorConfigurationOptions outputVersion) + : PInvokeGeneratorTest(outputMode, outputVersion) +{ + [TestCase("int")] + public Task SimpleStructMembers(string nativeType) + { + var inputContents = $@"struct MyStruct +{{ + {nativeType} r; + + [[deprecated]] + {nativeType} g; + + [[deprecated(""This is obsolete."")]] + {nativeType} b; + + {nativeType} a; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task StructDecl() + { + var inputContents = $@"struct MyStruct0 +{{ + int r; +}}; + +struct [[deprecated]] MyStruct1 +{{ + int r; +}}; + +struct [[deprecated(""This is obsolete."")]] MyStruct2 +{{ + int r; +}}; + +struct MyStruct3 +{{ + int r; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("int")] + public Task SimpleTypedefStructMembers(string nativeType) + { + var inputContents = $@"typedef struct +{{ + {nativeType} r; + + [[deprecated]] + {nativeType} g; + + [[deprecated(""This is obsolete."")]] + {nativeType} b; + + {nativeType} a; +}} MyStruct; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task TypedefStructDecl() + { + var inputContents = $@"typedef struct +{{ + int r; +}} MyStruct0; + +[[deprecated]] typedef struct +{{ + int r; +}} MyStruct1; + +[[deprecated(""This is obsolete."")]] typedef struct +{{ + int r; +}} MyStruct2; + +typedef struct +{{ + int r; +}} MyStruct3; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task SimpleEnumMembers() + { + var inputContents = $@"enum MyEnum : int +{{ + MyEnum_Value0, + MyEnum_Value1 [[deprecated]], + MyEnum_Value2 [[deprecated(""This is obsolete."")]], + MyEnum_Value3, +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task EnumDecl() + { + var inputContents = $@"enum MyEnum0 : int +{{ + MyEnum_Value0, +}}; + +enum [[deprecated]] MyEnum1 : int +{{ + MyEnum_Value1, +}}; + +enum [[deprecated(""This is obsolete."")]] MyEnum2 : int +{{ + MyEnum_Value2, +}}; + + +enum MyEnum3 : int +{{ + MyEnum_Value3, +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("int")] + public Task SimpleVarDecl(string nativeType) + { + var inputContents = $@" +{nativeType} MyVariable0 = 0; + +[[deprecated]] +{nativeType} MyVariable1 = 0; + +[[deprecated(""This is obsolete."")]] +{nativeType} MyVariable2 = 0; + +{nativeType} MyVariable3 = 0;"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task FuncDecl() + { + var inputContents = @" +void MyFunction0() +{ +} + +[[deprecated]] +void MyFunction1() +{ +} + +[[deprecated(""This is obsolete."")]] +void MyFunction2() +{ +} + +void MyFunction3() +{ +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task InstanceFunc() + { + var inputContents = @"struct MyStruct +{ + int MyFunction0() { return 0; } + + [[deprecated]] + int MyFunction1() { return 0; } + + [[deprecated(""This is obsolete."")]] + int MyFunction2() { return 0; } + + int MyFunction3() { return 0; } +};"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task FuncPtrDecl() + { + var inputContents = @" +typedef void (*Callback0)(); +[[deprecated]] typedef void (*Callback1)(); +[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); +typedef void (*Callback3)(); + +struct MyStruct0 { + Callback0 _callback; +}; +struct MyStruct1 { + Callback1 _callback; +}; +struct MyStruct2 { + Callback2 _callback; +}; +struct MyStruct3 { + Callback3 _callback; +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task FuncDllImport() + { + var inputContents = @" +extern ""C"" void MyFunction0(); +extern ""C"" [[deprecated]] void MyFunction1(); +extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); +extern ""C"" void MyFunction3();"; + + return ValidateGeneratedBindingsAsync(inputContents); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/EnumDeclarationTest.cs new file mode 100644 index 00000000..d9ad9230 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/EnumDeclarationTest.cs @@ -0,0 +1,374 @@ +// 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; + +[TestFixtureSource(nameof(FixtureArgs))] +public sealed class EnumDeclarationTest(PInvokeGeneratorOutputMode outputMode, PInvokeGeneratorConfigurationOptions outputVersion) + : PInvokeGeneratorTest(outputMode, outputVersion) +{ + private static readonly string[] s_excludeTestExcludedNames = ["MyEnum"]; + + [Test] + public Task BasicTest() + { + var inputContents = @"enum MyEnum : int +{ + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task BasicValueTest() + { + var inputContents = @"enum MyEnum : int +{ + MyEnum_Value1 = 1, + MyEnum_Value2, + MyEnum_Value3, +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task ExcludeTest() + { + var inputContents = @"enum MyEnum : int +{ + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents, excludedNames: s_excludeTestExcludedNames); + } + + [TestCase("short")] + [TestCase("int")] + [TestCase("long long")] + [TestCase("unsigned")] + public Task ExplicitTypedTest(string nativeType) + { + var inputContents = $@"enum MyEnum : {nativeType} +{{ + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + public Task ExplicitTypedWithNativeTypeNameTest(string nativeType) + { + var inputContents = $@"enum MyEnum : {nativeType} +{{ + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task RemapTest() + { + var inputContents = @"typedef enum _MyEnum1 : int +{ + MyEnum1_Value1, + MyEnum1_Value2, + MyEnum1_Value3, +} MyEnum1; + +namespace Namespace1 +{ + namespace Namespace2 + { + typedef enum _MyEnum2 : int + { + MyEnum2_Value1, + MyEnum2_Value2, + MyEnum2_Value3, + } MyEnum2; + + typedef enum _MyEnum3 : int + { + MyEnum3_Value1, + MyEnum3_Value2, + MyEnum3_Value3, + } MyEnum3; + + typedef enum _MyEnum4 : int + { + MyEnum4_Value1, + MyEnum4_Value2, + MyEnum4_Value3, + } MyEnum4; + } +} +"; + + var remappedNames = new Dictionary { ["_MyEnum1"] = "MyEnum1", ["Namespace1.Namespace2._MyEnum2"] = "MyEnum2", ["_MyEnum3"] = "MyEnum3", ["Namespace1::Namespace2::_MyEnum4"] = "MyEnum4" }; + return ValidateGeneratedBindingsAsync(inputContents, remappedNames: remappedNames); + } + + [Test] + public Task WithAttributeTest() + { + var inputContents = @"enum MyEnum1 : int +{ + MyEnum1_Value1 = 1, +}; + +enum MyEnum2 : int +{ + MyEnum2_Value1 = 1, +}; +"; + + var withAttributes = new Dictionary> + { + ["MyEnum1"] = ["Flags"] + }; + return ValidateGeneratedBindingsAsync(inputContents, withAttributes: withAttributes); + } + + [Test] + public Task WithNamespaceTest() + { + var inputContents = @"enum MyEnum1 : int +{ + MyEnum1_Value1 = 1, +}; + +enum MyEnum2 : int +{ + MyEnum2_Value1 = MyEnum1_Value1, +}; +"; + + var withNamespaces = new Dictionary> + { + ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] + }; + return ValidateGeneratedBindingsAsync(inputContents, withUsings: withNamespaces); + } + + [Test] + public Task WithNamespaceStarTest() + { + var inputContents = @"enum MyEnum1 : int +{ + MyEnum1_Value1 = 1, +}; + +enum MyEnum2 : int +{ + MyEnum2_Value1 = MyEnum1_Value1, +}; +"; + + var withNamespaces = new Dictionary> + { + ["*"] = ["static ClangSharp.Test.MyEnum1"] + }; + return ValidateGeneratedBindingsAsync(inputContents, withUsings: withNamespaces); + } + + [Test] + public Task WithNamespaceStarPlusTest() + { + var inputContents = @"enum MyEnum1 : int +{ + MyEnum1_Value1 = 1, +}; + +enum MyEnum2 : int +{ + MyEnum2_Value1 = MyEnum1_Value1, +}; +"; + + var withNamespaces = new Dictionary> + { + ["*"] = ["static ClangSharp.Test.MyEnum1"], + ["MyEnum2"] = ["System"] + }; + return ValidateGeneratedBindingsAsync(inputContents, withUsings: withNamespaces); + } + + [Test] + public Task WithCastToEnumType() + { + var inputContents = @"enum MyEnum : int +{ + MyEnum_Value0 = (MyEnum) 10, + MyEnum_Value1 = (MyEnum) MyEnum_Value0, + MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task WithMultipleEnumsTest() + { + var inputContents = @"enum MyEnum1 : int +{ + MyEnum1_Value0 = 10, +}; + +enum MyEnum2 : int +{ + MyEnum2_Value0 = MyEnum1_Value0, + MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task WithicitConversionTest() + { + var inputContents = @"enum MyEnum : int +{ + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2 = 0x80000000, +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task WithTypeTest() + { + var inputContents = @"enum MyEnum : int +{ + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, +}; +"; + + var withTypes = new Dictionary { + ["MyEnum"] = "uint" + }; + return ValidateGeneratedBindingsAsync(inputContents, withTypes: withTypes); + } + + [Test] + public Task WithTypeAndicitConversionTest() + { + var inputContents = @"enum MyEnum : int +{ + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2 = 0x80000000, +}; +"; + + var withTypes = new Dictionary + { + ["MyEnum"] = "uint" + }; + return ValidateGeneratedBindingsAsync(inputContents, withTypes: withTypes); + } + + [Test] + public Task WithTypeStarTest() + { + var inputContents = @"enum MyEnum1 : int +{ + MyEnum1_Value0 +}; + +enum MyEnum2 : int +{ + MyEnum2_Value0 +}; +"; + + var withTypes = new Dictionary + { + ["*"] = "uint" + }; + return ValidateGeneratedBindingsAsync(inputContents, withTypes: withTypes); + } + + [Test] + public Task WithTypeStarOverrideTest() + { + var inputContents = @"enum MyEnum1 : int +{ + MyEnum1_Value0 +}; + +enum MyEnum2 : int +{ + MyEnum2_Value0 +}; +"; + + var withTypes = new Dictionary + { + ["*"] = "uint", + ["MyEnum1"] = "int", + }; + return ValidateGeneratedBindingsAsync(inputContents, withTypes: withTypes); + } + [Test] + public Task WithAnonymousEnumTest() + { + var inputContents = @"enum +{ + MyEnum1_Value1 = 1, +}; + +enum MyEnum2 : int +{ + MyEnum2_Value1 = MyEnum1_Value1, +}; +"; + + 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 ValidateGeneratedBindingsAsync(inputContents, expectedDiagnostics: diagnostics); + } + + [Test] + public Task WithReferenceToAnonymousEnumEnumeratorTest() + { + var inputContents = @"enum +{ + MyEnum1_Value1 = 1, +}; + +const int MyEnum2_Value1 = 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 ValidateGeneratedBindingsAsync(inputContents, expectedDiagnostics: diagnostics); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/FunctionDeclarationBodyImportTest.cs new file mode 100644 index 00000000..b4c0e8a0 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/FunctionDeclarationBodyImportTest.cs @@ -0,0 +1,908 @@ +// 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; + +[TestFixtureSource(nameof(FixtureArgs))] +public sealed class FunctionDeclarationBodyImportTest(PInvokeGeneratorOutputMode outputMode, PInvokeGeneratorConfigurationOptions outputVersion) + : PInvokeGeneratorTest(outputMode, outputVersion) +{ + [Test] + public Task ArraySubscriptTest() + { + var inputContents = @"int MyFunction(int* pData, int index) +{ + return pData[index]; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task BasicTest() + { + var inputContents = @"void MyFunction() +{ +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [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) + { + var inputContents = $@"int MyFunction(int x, int y) +{{ + return x {opcode} y; +}} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("==")] + [TestCase("!=")] + [TestCase("<")] + [TestCase("<=")] + [TestCase(">")] + [TestCase(">=")] + public Task BinaryOperatorCompareTest(string opcode) + { + var inputContents = $@"bool MyFunction(int x, int y) +{{ + return x {opcode} y; +}} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("&&")] + [TestCase("||")] + public Task BinaryOperatorBooleanTest(string opcode) + { + var inputContents = $@"bool MyFunction(bool x, bool y) +{{ + return x {opcode} y; +}} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task BreakTest() + { + var inputContents = @"int MyFunction(int value) +{ + while (true) + { + break; + } + + return 0; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task CallFunctionTest() + { + var inputContents = @"void MyCalledFunction() +{ +} + +void MyFunction() +{ + MyCalledFunction(); +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task CallFunctionWithArgsTest() + { + var inputContents = @"void MyCalledFunction(int x, int y) +{ +} + +void MyFunction() +{ + MyCalledFunction(0, 1); +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task CaseTest() + { + var inputContents = @"int MyFunction(int value) +{ + switch (value) + { + case 0: + { + return 0; + } + + case 1: + case 2: + { + return 3; + } + } + + return -1; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task CaseNoCompoundTest() + { + var inputContents = @"int MyFunction(int value) +{ + switch (value) + { + case 0: + return 0; + + case 2: + case 3: + return 5; + } + + return -1; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task CompareMultipleEnumTest() + { + var inputContents = @"enum MyEnum : int +{ + MyEnum_Value0, + MyEnum_Value1, + MyEnum_Value2, +}; + +static inline int MyFunction(MyEnum x) +{ + return x == MyEnum_Value0 || + x == MyEnum_Value1 || + x == MyEnum_Value2; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task ConditionalOperatorTest() + { + var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) +{ + return condition ? lhs : rhs; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task ContinueTest() + { + var inputContents = @"int MyFunction(int value) +{ + while (true) + { + continue; + } + + return 0; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task CStyleFunctionalCastTest() + { + var inputContents = @"int MyFunction(float input) +{ + return (int)input; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task CxxFunctionalCastTest() + { + var inputContents = @"int MyFunction(float input) +{ + return int(input); +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task CxxConstCastTest() + { + var inputContents = @"void* MyFunction(const void* input) +{ + return const_cast(input); +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task CxxDynamicCastTest() + { + var inputContents = @"struct MyStructA +{ + virtual void MyMethod() = 0; +}; + +struct MyStructB : MyStructA { }; + +MyStructB* MyFunction(MyStructA* input) +{ + return dynamic_cast(input); +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task CxxReinterpretCastTest() + { + var inputContents = @"int* MyFunction(void* input) +{ + return reinterpret_cast(input); +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task CxxStaticCastTest() + { + var inputContents = @"int* MyFunction(void* input) +{ + return static_cast(input); +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task DeclTest() + { + var inputContents = @"\ +int MyFunction() +{ + int x = 0; + int y = 1, z = 2; + return x + y + z; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task DoTest() + { + var inputContents = @"int MyFunction(int count) +{ + int i = 0; + + do + { + i++; + } + while (i < count); + + return i; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task DoNonCompoundTest() + { + var inputContents = @"int MyFunction(int count) +{ + int i = 0; + + while (i < count) + i++; + + return i; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task ForTest() + { + var inputContents = @"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--) + // { + // x += 2; + // } + + x = 0; + + for (; x < count;) + { + x++; + } + + for (int i = 0;;) + { + i++; + } + + for (x = 0;;) + { + x++; + } + + for (;;) + { + return -1; + } +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task ForNonCompoundTest() + { + var inputContents = @"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--) + // x += 2; + + x = 0; + + for (; x < count;) + x++; + + for (int i = 0;;) + i++; + + for (x = 0;;) + x++; + + for (;;) + return -1; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task IfTest() + { + var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) +{ + if (condition) + { + return lhs; + } + + return rhs; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task IfElseTest() + { + var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) +{ + if (condition) + { + return lhs; + } + else + { + return rhs; + } +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task IfElseIfTest() + { + var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) +{ + if (condition1) + { + return a; + } + else if (condition2) + { + return b; + } + + return c; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task IfElseNonCompoundTest() + { + var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) +{ + if (condition) + return lhs; + else + return rhs; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task InitListForArrayTest() + { + var inputContents = @" +void MyFunction() +{ + int x[4] = { 1, 2, 3, 4 }; + int y[4] = { 1, 2, 3 }; + int z[] = { 1, 2 }; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task InitListForRecordDeclTest() + { + var inputContents = @"struct MyStruct +{ + float x; + float y; + float z; + float w; +}; + +MyStruct MyFunction1() +{ + return { 1.0f, 2.0f, 3.0f, 4.0f }; +} + +MyStruct MyFunction2() +{ + return { 1.0f, 2.0f, 3.0f }; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task MemberTest() + { + var inputContents = @"struct MyStruct +{ + int value; +}; + +int MyFunction1(MyStruct instance) +{ + return instance.value; +} + +int MyFunction2(MyStruct* instance) +{ + return instance->value; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task RefToPtrTest() + { + var inputContents = @"struct MyStruct { + int value; +}; + +bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) +{ + return lhs.value == rhs.value; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task ReturnCXXNullPtrTest() + { + var inputContents = @"void* MyFunction() +{ + return nullptr; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("false")] + [TestCase("true")] + public Task ReturnCXXBooleanLiteralTest(string value) + { + var inputContents = $@"bool MyFunction() +{{ + return {value}; +}} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("5e-1f")] + [TestCase("3.14f")] + public Task ReturnFloatingLiteralDoubleTest(string value) + { + var inputContents = $@"double MyFunction() +{{ + return {value}; +}} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("5e-1f")] + [TestCase("3.14f")] + public Task ReturnFloatingLiteralSingleTest(string value) + { + var inputContents = $@"float MyFunction() +{{ + return {value}; +}} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task ReturnEmptyTest() + { + var inputContents = @"void MyFunction() +{ + return; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task ReturnIntegerLiteralInt32Test() + { + var inputContents = @"int MyFunction() +{ + return -1; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task AccessUnionMemberTest() + { + var inputContents = @"union MyUnion +{ + struct { int a; }; +}; + +void MyFunction() +{ + MyUnion myUnion; + myUnion.a = 10; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task ReturnStructTest() + { + var inputContents = @"struct MyStruct +{ + double r; + double g; + double b; +}; + +MyStruct MyFunction() +{ + MyStruct myStruct; + return myStruct; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task SwitchTest() + { + var inputContents = @"int MyFunction(int value) +{ + switch (value) + { + default: + { + return 0; + } + } +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task SwitchNonCompoundTest() + { + var inputContents = @"int MyFunction(int value) +{ + switch (value) + default: + { + return 0; + } + + switch (value) + default: + return 0; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task UnaryOperatorAddrOfTest() + { + var inputContents = @"int* MyFunction(int value) +{ + return &value; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task UnaryOperatorDerefTest() + { + var inputContents = @"int MyFunction(int* value) +{ + return *value; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task UnaryOperatorLogicalNotTest() + { + var inputContents = @"bool MyFunction(bool value) +{ + return !value; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("++")] + [TestCase("--")] + public Task UnaryOperatorPostfixTest(string opcode) + { + var inputContents = $@"int MyFunction(int value) +{{ + return value{opcode}; +}} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("+")] + [TestCase("++")] + [TestCase("-")] + [TestCase("--")] + [TestCase("~")] + public Task UnaryOperatorPrefixTest(string opcode) + { + var inputContents = $@"int MyFunction(int value) +{{ + return {opcode}value; +}} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task WhileTest() + { + var inputContents = @"int MyFunction(int count) +{ + int i = 0; + + while (i < count) + { + i++; + } + + return i; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task WhileNonCompoundTest() + { + var inputContents = @"int MyFunction(int count) +{ + int i = 0; + + while (i < count) + i++; + + return i; +} +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/FunctionDeclarationDllImportTest.cs new file mode 100644 index 00000000..c85aca3f --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/FunctionDeclarationDllImportTest.cs @@ -0,0 +1,217 @@ +// 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; + +[TestFixtureSource(nameof(FixtureArgs))] +public sealed class FunctionDeclarationDllImportTest(PInvokeGeneratorOutputMode outputMode, PInvokeGeneratorConfigurationOptions outputVersion) + : PInvokeGeneratorTest(outputMode, outputVersion) +{ + private static readonly string[] s_templateTestExcludedNames = ["MyTemplate"]; + + [Test] + public Task BasicTest() + { + var inputContents = @"extern ""C"" void MyFunction();"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task ArrayParameterTest() + { + var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task FunctionPointerParameterTest() + { + var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task NamespaceTest() + { + var inputContents = @"namespace MyNamespace +{ + void MyFunction(); +}"; + + return ValidateGeneratedBindingsAsync(inputContents, osxTransform: (output) => output.Replace("__ZN11MyNamespace10MyFunctionEv", "_ZN11MyNamespace10MyFunctionEv", System.StringComparison.Ordinal)); + } + + [TestCase("int")] + [TestCase("bool")] + [TestCase("float *")] + [TestCase("void (*)(int)")] + public Task TemplateParameterTest(string nativeType) + { + var inputContents = @$"template struct MyTemplate; + +extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; + + return ValidateGeneratedBindingsAsync(inputContents, excludedNames: s_templateTestExcludedNames); + } + + [Test] + public Task TemplateMemberTest() + { + var inputContents = @$"template struct MyTemplate +{{ +}}; + +struct MyStruct +{{ + MyTemplate a; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents, excludedNames: s_templateTestExcludedNames); + } + + [Test] + public Task NoLibraryPathTest() + { + var inputContents = @"extern ""C"" void MyFunction();"; + + return ValidateGeneratedBindingsAsync(inputContents, libraryPath: string.Empty); + } + + [Test] + public Task WithLibraryPathTest() + { + var inputContents = @"extern ""C"" void MyFunction();"; + + var withLibraryPaths = new Dictionary + { + ["MyFunction"] = "ClangSharpPInvokeGenerator" + }; + return ValidateGeneratedBindingsAsync(inputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); + } + + [Test] + public Task WithLibraryPathStarTest() + { + var inputContents = @"extern ""C"" void MyFunction();"; + + var withLibraryPaths = new Dictionary + { + ["*"] = "ClangSharpPInvokeGenerator" + }; + return ValidateGeneratedBindingsAsync(inputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); + } + + [TestCase("unsigned char", "0")] + [TestCase("double", "1.0")] + [TestCase("short", "2")] + [TestCase("int", "3")] + [TestCase("long long", "4")] + [TestCase("signed char", "5")] + [TestCase("float", "6.0f")] + [TestCase("unsigned short", "7")] + [TestCase("unsigned int", "8")] + [TestCase("unsigned long long", "9")] + [TestCase("unsigned short", "'A'")] + public Task OptionalParameterTest(string nativeType, string nativeInit) + { + var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("void *", "nullptr")] + [TestCase("void *", "0")] + public Task OptionalParameterUnsafeTest(string nativeType, string nativeInit) + { + var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task WithCallConvTest() + { + var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; + + var withCallConvs = new Dictionary { + ["MyFunction1"] = "Winapi" + }; + return ValidateGeneratedBindingsAsync(inputContents, withCallConvs: withCallConvs); + } + + [Test] + public Task WithCallConvStarTest() + { + var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; + + var withCallConvs = new Dictionary + { + ["*"] = "Winapi" + }; + return ValidateGeneratedBindingsAsync(inputContents, withCallConvs: withCallConvs); + } + + [Test] + public Task WithCallConvStarOverrideTest() + { + var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; + + var withCallConvs = new Dictionary + { + ["*"] = "Winapi", + ["MyFunction2"] = "StdCall" + }; + return ValidateGeneratedBindingsAsync(inputContents, withCallConvs: withCallConvs); + } + + [Test] + public Task WithSetLastErrorTest() + { + var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; + + var withSetLastErrors = new string[] + { + "MyFunction1" + }; + return ValidateGeneratedBindingsAsync(inputContents, withSetLastErrors: withSetLastErrors); + } + + [Test] + public Task WithSetLastErrorStarTest() + { + var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; + + var withSetLastErrors = new string[] + { + "*" + }; + return ValidateGeneratedBindingsAsync(inputContents, withSetLastErrors: withSetLastErrors); + } + + [Test] + public Task SourceLocationTest() + { + const string InputContents = @"extern ""C"" void MyFunction(float value);"; + + return ValidateGeneratedBindingsAsync(InputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); + } + + [Test] + public Task VarargsTest() => Task.CompletedTask; + + [Test] + public Task IntrinsicsTest() + { + const string InputContents = @"extern ""C"" void __builtin_cpu_init(); +#pragma intrinsic(__builtin_cpu_init)"; + + return ValidateGeneratedBindingsAsync(InputContents); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/FunctionPointerDeclarationTest.cs new file mode 100644 index 00000000..81a37a39 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/FunctionPointerDeclarationTest.cs @@ -0,0 +1,50 @@ +// 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; + +[TestFixtureSource(nameof(FixtureArgs))] +public sealed class FunctionPointerDeclarationTest(PInvokeGeneratorOutputMode outputMode, PInvokeGeneratorConfigurationOptions outputVersion) + : PInvokeGeneratorTest(outputMode, outputVersion) +{ + [Test] + public Task BasicTest() + { + var inputContents = @"typedef void (*Callback)(); + +struct MyStruct { + Callback _callback; +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task CallconvTest() + { + var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); + +struct MyStruct { + Callback _callback; +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task PointerlessTypedefTest() + { + var inputContents = @"typedef void (Callback)(); + +struct MyStruct { + Callback* _callback; +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/OptionsTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/OptionsTest.cs index f2c8bbaf..06c85fa5 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/OptionsTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/OptionsTest.cs @@ -6,7 +6,8 @@ namespace ClangSharp.UnitTests; -public sealed class OptionsTest : PInvokeGeneratorTest +public sealed class OptionsTest() + : PInvokeGeneratorTest(PInvokeGeneratorOutputMode.CSharp, PInvokeGeneratorConfigurationOptions.GenerateLatestCode) { [Test] public Task WithUsings() @@ -19,31 +20,7 @@ struct StructC {}; } struct StructD {}; "; - var expectedOutputContents = @"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 - { - } -} -"; var withUsings = new Dictionary> { ["StructA"] = ["ForStructA1", "ForStructA2"], ["*"] = ["ForStar"], @@ -52,43 +29,20 @@ public partial struct StructD ["DoesNotExist"] = ["ErrorShouldNotBeInOutput"], }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withUsings); + return ValidateGeneratedBindingsAsync(inputContents, withUsings: withUsings); } [Test] public Task WithAttributes() { var inputContents = @"struct StructA {}; struct StructB {}; struct StructC {}; struct StructD {};"; - var expectedOutputContents = -@"namespace ClangSharp.Test -{ - [A] - public partial struct StructA - { - } - [B] - public partial struct StructB - { - } - - [Star] - public partial struct StructC - { - } - - [Star] - public partial struct StructD - { - } -} -"; var withAttributes = new Dictionary> { ["StructA"] = [@"A"], ["StructB"] = [@"B"], ["*"] = [@"Star"], }; - return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); + return ValidateGeneratedBindingsAsync(inputContents, withAttributes: withAttributes); } } diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/PInvokeGeneratorTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/PInvokeGeneratorTest.cs index 34fb1b26..4fc58ad5 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/PInvokeGeneratorTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/PInvokeGeneratorTest.cs @@ -1,35 +1,38 @@ // 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 ClangSharp.Interop; +using NUnit.Framework; +using System; using System.Collections.Generic; using System.Diagnostics; +using System.Globalization; using System.IO; +using System.Runtime.InteropServices; using System.Threading.Tasks; -using NUnit.Framework; -using System.Xml.Linq; -using ClangSharp.Interop; using static ClangSharp.Interop.CXTranslationUnit_Flags; namespace ClangSharp.UnitTests; -public abstract class PInvokeGeneratorTest +[Parallelizable(ParallelScope.All)] +public abstract class PInvokeGeneratorTest(PInvokeGeneratorOutputMode outputMode, PInvokeGeneratorConfigurationOptions outputVersion) { - protected const string DefaultInputFileName = "ClangUnsavedFile.h"; - protected const string DefaultLibraryPath = "ClangSharpPInvokeGenerator"; - protected const string DefaultNamespaceName = "ClangSharp.Test"; + private readonly PInvokeGeneratorOutputMode _outputMode = outputMode; + private readonly string _baselineFileExtension = outputMode == PInvokeGeneratorOutputMode.CSharp ? "cs" : "xml"; + private readonly PInvokeGeneratorConfigurationOptions _outputVersion = outputVersion; + private readonly string _outputVersionAsString = OutputVersionToString(outputVersion); - protected const CXTranslationUnit_Flags DefaultTranslationUnitFlags = CXTranslationUnit_IncludeAttributedTypes // Include attributed types in CXType + private const string UpdateBaselineEnvVar = "AUTO_UPDATE_BASELINE"; + + private const string DefaultInputFileName = "ClangUnsavedFile.h"; + private const string DefaultLibraryPath = "ClangSharpPInvokeGenerator"; + private const string DefaultNamespaceName = "ClangSharp.Test"; + + private const CXTranslationUnit_Flags DefaultTranslationUnitFlags = CXTranslationUnit_IncludeAttributedTypes // Include attributed types in CXType | CXTranslationUnit_VisitImplicitAttributes // Implicit attributes should be visited | CXTranslationUnit_DetailedPreprocessingRecord; - protected const string DefaultCStandard = "c17"; - protected const string DefaultCppStandard = "c++17"; + private const string DefaultCppStandard = "c++17"; - protected static readonly string[] DefaultCClangCommandLineArgs = - [ - $"-std={DefaultCStandard}", // The input files should be compiled for C 17 - "-xc", // The input files are C - ]; - - protected static readonly string[] DefaultCppClangCommandLineArgs = + private static readonly string[] s_defaultCppClangCommandLineArgs = [ $"-std={DefaultCppStandard}", // The input files should be compiled for C++ 17 "-xc++", // The input files are C++ @@ -37,68 +40,104 @@ public abstract class PInvokeGeneratorTest "-Wno-c++11-narrowing" ]; - protected static string EscapeXml(string value) => new XText(value).ToString(); - - protected static Task ValidateGeneratedCSharpPreviewWindowsBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.CSharp, PInvokeGeneratorConfigurationOptions.GeneratePreviewCode | PInvokeGeneratorConfigurationOptions.None | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); - - protected static Task ValidateGeneratedCSharpPreviewUnixBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.CSharp, PInvokeGeneratorConfigurationOptions.GeneratePreviewCode | PInvokeGeneratorConfigurationOptions.GenerateUnixTypes | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); - - protected static Task ValidateGeneratedCSharpLatestWindowsBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.CSharp, PInvokeGeneratorConfigurationOptions.GenerateLatestCode | PInvokeGeneratorConfigurationOptions.None | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); - - protected static Task ValidateGeneratedCSharpLatestUnixBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.CSharp, PInvokeGeneratorConfigurationOptions.GenerateLatestCode | PInvokeGeneratorConfigurationOptions.GenerateUnixTypes | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); + private static readonly string s_osName = OperatingSystem.IsWindows() ? "Windows" : "Unix"; - protected static Task ValidateGeneratedCSharpDefaultWindowsBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.CSharp, PInvokeGeneratorConfigurationOptions.None | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); + private static readonly bool s_autoUpdateBaselines = Environment.GetEnvironmentVariable(UpdateBaselineEnvVar) == "1"; + private static readonly string s_baselineDirectory = FindBaselineDirectory(); - protected static Task ValidateGeneratedCSharpDefaultUnixBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.CSharp, PInvokeGeneratorConfigurationOptions.GenerateUnixTypes | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); - - protected static Task ValidateGeneratedCSharpCompatibleWindowsBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.CSharp, PInvokeGeneratorConfigurationOptions.GenerateCompatibleCode | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); - - protected static Task ValidateGeneratedCSharpCompatibleUnixBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.CSharp, PInvokeGeneratorConfigurationOptions.GenerateCompatibleCode | PInvokeGeneratorConfigurationOptions.GenerateUnixTypes | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); - - protected static Task ValidateGeneratedXmlPreviewWindowsBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.Xml, PInvokeGeneratorConfigurationOptions.GeneratePreviewCode | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); - - protected static Task ValidateGeneratedXmlPreviewUnixBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.Xml, PInvokeGeneratorConfigurationOptions.GeneratePreviewCode | PInvokeGeneratorConfigurationOptions.GenerateUnixTypes | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); - - protected static Task ValidateGeneratedXmlLatestWindowsBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.Xml, PInvokeGeneratorConfigurationOptions.GenerateLatestCode | PInvokeGeneratorConfigurationOptions.None | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); - - protected static Task ValidateGeneratedXmlLatestUnixBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.Xml, PInvokeGeneratorConfigurationOptions.GenerateLatestCode | PInvokeGeneratorConfigurationOptions.GenerateUnixTypes | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); + protected static IEnumerable FixtureArgs() + { + foreach (var outputLang in new[] { PInvokeGeneratorOutputMode.CSharp, PInvokeGeneratorOutputMode.Xml }) + { + foreach (var outputVersion in new[] { + PInvokeGeneratorConfigurationOptions.GenerateCompatibleCode, + PInvokeGeneratorConfigurationOptions.None, + PInvokeGeneratorConfigurationOptions.GenerateLatestCode, + PInvokeGeneratorConfigurationOptions.GeneratePreviewCode }) + { + yield return new object[] { outputLang, outputVersion }; + } + } + } - protected static Task ValidateGeneratedXmlDefaultWindowsBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.Xml, PInvokeGeneratorConfigurationOptions.None | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); + private static string FindBaselineDirectory() + { + var currentDirectory = new DirectoryInfo(TestContext.CurrentContext.TestDirectory); + do + { + if (File.Exists(Path.Join(currentDirectory.FullName, "ClangSharp.sln"))) + { + return Path.Join(currentDirectory.FullName, "tests", "ClangSharp.PInvokeGenerator.UnitTests", "Baselines"); + } + currentDirectory = currentDirectory.Parent; + } while (currentDirectory != null); - protected static Task ValidateGeneratedXmlDefaultUnixBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.Xml, PInvokeGeneratorConfigurationOptions.GenerateUnixTypes | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); + Assert.Fail("Could not find ClangSharp.sln, test artifacts must be in a child directory of the source"); + return string.Empty; + } - protected static Task ValidateGeneratedXmlCompatibleWindowsBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.Xml, PInvokeGeneratorConfigurationOptions.GenerateCompatibleCode | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); + private static string OutputVersionToString(PInvokeGeneratorConfigurationOptions outputVersion) + { + switch (outputVersion) + { + case PInvokeGeneratorConfigurationOptions.GenerateCompatibleCode: + return "Compatible"; + case PInvokeGeneratorConfigurationOptions.None: + return "Default"; + case PInvokeGeneratorConfigurationOptions.GenerateLatestCode: + return "Latest"; + case PInvokeGeneratorConfigurationOptions.GeneratePreviewCode: + return "Preview"; + default: + Assert.Fail("Unknown output version"); + return string.Empty; + } + } - protected static Task ValidateGeneratedXmlCompatibleUnixBindingsAsync(string inputContents, string expectedOutputContents, 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) - => ValidateGeneratedBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorOutputMode.Xml, PInvokeGeneratorConfigurationOptions.GenerateCompatibleCode | PInvokeGeneratorConfigurationOptions.GenerateUnixTypes | additionalConfigOptions, excludedNames, remappedNames, withAccessSpecifiers, withAttributes, withCallConvs, withClasses, withLibraryPaths, withNamespaces, withSetLastErrors, withTransparentStructs, withTypes, withUsings, withPackings, expectedDiagnostics, libraryPath, commandLineArgs, language, languageStandard); + private static async ValueTask UpdateBaselineIfRequestedAsync(string path, string contents) + { + if (s_autoUpdateBaselines) + { + TestContext.WriteLine($"Updating baseline {Path.GetFileName(path)}."); + await File.WriteAllTextAsync(path, contents).ConfigureAwait(false); + return true; + } + return false; + } - private static async Task ValidateGeneratedBindingsAsync(string inputContents, string expectedOutputContents, PInvokeGeneratorOutputMode outputMode, PInvokeGeneratorConfigurationOptions configOptions, 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) + protected async Task ValidateGeneratedBindingsAsync( + string inputContents, + 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, + Func? osxTransform = null) { Assert.That(DefaultInputFileName, Does.Exist); - commandLineArgs ??= DefaultCppClangCommandLineArgs; + commandLineArgs ??= s_defaultCppClangCommandLineArgs; - configOptions |= PInvokeGeneratorConfigurationOptions.GenerateMacroBindings; + var configOptions = additionalConfigOptions | _outputVersion | PInvokeGeneratorConfigurationOptions.GenerateMacroBindings; using var outputStream = new MemoryStream(); using var unsavedFile = CXUnsavedFile.Create(DefaultInputFileName, inputContents); var unsavedFiles = new CXUnsavedFile[] { unsavedFile }; - var config = new PInvokeGeneratorConfiguration(language, languageStandard, DefaultNamespaceName, Path.GetRandomFileName(), headerFile: null, outputMode, configOptions) { + var config = new PInvokeGeneratorConfiguration(language, languageStandard, DefaultNamespaceName, Path.GetRandomFileName(), headerFile: null, _outputMode, configOptions) { DefaultClass = null, ExcludedNames = excludedNames, IncludedNames = null, @@ -144,6 +183,53 @@ private static async Task ValidateGeneratedBindingsAsync(string inputContents, s using var streamReader = new StreamReader(outputStream); var actualOutputContents = await streamReader.ReadToEndAsync().ConfigureAwait(false); - Assert.That(actualOutputContents, Is.EqualTo(expectedOutputContents)); + + if (osxTransform is not null && RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + actualOutputContents = osxTransform(actualOutputContents); + } + + var testClassName = TestContext.CurrentContext.Test.ClassName?.Substring((TestContext.CurrentContext.Test.Namespace?.Length ?? -1) + 1) ?? ""; + var arguments = string.Empty; + foreach (var arg in TestContext.CurrentContext.Test.Arguments) + { + arguments += string.Format(CultureInfo.InvariantCulture, ".{0}", arg); + } + arguments = arguments.Replace("<", "__lt", StringComparison.Ordinal) + .Replace(">", "__gt", StringComparison.Ordinal) + .Replace(":", "__cln", StringComparison.Ordinal) + .Replace("\"", "__quot", StringComparison.Ordinal) + .Replace("/", "__fs", StringComparison.Ordinal) + .Replace("\\", "__bs", StringComparison.Ordinal) + .Replace("|", "__vl", StringComparison.Ordinal) + .Replace("?", "__qm", StringComparison.Ordinal) + .Replace("*", "__ast", StringComparison.Ordinal); + var testFilename = $"{testClassName}.{TestContext.CurrentContext.Test.MethodName}{arguments}.{s_osName}.{_outputVersionAsString}.{_baselineFileExtension}"; + var expectedOutputPath = Path.Join(s_baselineDirectory, testFilename); + + if (!File.Exists(expectedOutputPath)) + { + if (!await UpdateBaselineIfRequestedAsync(expectedOutputPath, actualOutputContents).ConfigureAwait(true)) + { + Assert.Fail($"Baseline does not exist. Set {UpdateBaselineEnvVar}=1 to automatically generate it."); + } + } + else + { + var expectedOutputContents = await File.ReadAllTextAsync(expectedOutputPath).ConfigureAwait(false); + if (expectedOutputContents != actualOutputContents) + { + if (!await UpdateBaselineIfRequestedAsync(expectedOutputPath, actualOutputContents).ConfigureAwait(true)) + { + // Write the actual output and attach it to the test: this allows us to gather the actual output + // from CI. + var actualOutputPath = Path.Join(TestContext.CurrentContext.WorkDirectory, testFilename); + await File.WriteAllTextAsync(actualOutputPath, actualOutputContents).ConfigureAwait(false); + TestContext.AddTestAttachment(actualOutputPath); + + Assert.That(actualOutputContents, Is.EqualTo(expectedOutputContents)); + } + } + } } } diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/StructDeclarationTest.cs new file mode 100644 index 00000000..2b78babe --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/StructDeclarationTest.cs @@ -0,0 +1,798 @@ +// 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.Runtime.InteropServices; +using System.Threading.Tasks; +using NUnit.Framework; + +namespace ClangSharp.UnitTests; + +[TestFixtureSource(nameof(FixtureArgs))] +public sealed class StructDeclarationTest(PInvokeGeneratorOutputMode outputMode, PInvokeGeneratorConfigurationOptions outputVersion) + : PInvokeGeneratorTest(outputMode, outputVersion) +{ + private static readonly string[] s_excludeTestExcludedNames = ["MyStruct"]; + private static readonly string[] s_guidTestExcludedNames = ["DECLSPEC_UUID"]; + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task IncompleteArraySizeTest(string nativeType) + { + var inputContents = $@"struct MyStruct +{{ + {nativeType} x[]; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task BasicTest(string nativeType) + { + var inputContents = $@"struct MyStruct +{{ + {nativeType} r; + {nativeType} g; + {nativeType} b; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task BasicTestInCMode(string nativeType) + { + var inputContents = $@"typedef struct +{{ + {nativeType} r; + {nativeType} g; + {nativeType} b; +}} MyStruct; +"; + + return ValidateGeneratedBindingsAsync(inputContents, commandLineArgs: []); + } + + [TestCase("unsigned char")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + [TestCase("bool")] + public Task BasicWithNativeTypeNameTest(string nativeType) + { + var inputContents = $@"struct MyStruct +{{ + {nativeType} r; + {nativeType} g; + {nativeType} b; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task BitfieldTest() + { + var inputContents = @"struct MyStruct1 +{ + unsigned int o0_b0_24 : 24; + unsigned int o4_b0_16 : 16; + unsigned int o4_b16_3 : 3; + int o4_b19_3 : 3; + unsigned char o4_b22_1 : 1; + int o4_b23_1 : 1; + int o4_b24_1 : 1; +}; + +struct MyStruct2 +{ + unsigned int o0_b0_1 : 1; + int x; + unsigned int o8_b0_1 : 1; +}; + +struct MyStruct3 +{ + unsigned int o0_b0_1 : 1; + unsigned int o0_b1_1 : 1; +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task BitfieldWithNativeBitfieldAttributeTest() + { + var inputContents = @"struct MyStruct1 +{ + unsigned int o0_b0_24 : 24; + unsigned int o4_b0_16 : 16; + unsigned int o4_b16_3 : 3; + int o4_b19_3 : 3; + unsigned char o4_b22_1 : 1; + int o4_b23_1 : 1; + int o4_b24_1 : 1; +}; + +struct MyStruct2 +{ + unsigned int o0_b0_1 : 1; + int x; + unsigned int o8_b0_1 : 1; +}; + +struct MyStruct3 +{ + unsigned int o0_b0_1 : 1; + unsigned int o0_b1_1 : 1; +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); + } + + [Test] + public Task DeclTypeTest() + { + var inputContents = @"extern ""C"" void MyFunction(); + +typedef struct +{ + decltype(&MyFunction) _callback; +} MyStruct; +"; + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task ExcludeTest() + { + var inputContents = "typedef struct MyStruct MyStruct;"; + return ValidateGeneratedBindingsAsync(inputContents, excludedNames: s_excludeTestExcludedNames); + } + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task FixedSizedBufferNonPrimitiveTest(string nativeType) + { + var inputContents = $@"struct MyStruct +{{ + {nativeType} value; +}}; + +struct MyOtherStruct +{{ + MyStruct c[3]; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task FixedSizedBufferNonPrimitiveMultidimensionalTest(string nativeType) + { + var inputContents = $@"struct MyStruct +{{ + {nativeType} value; +}}; + +struct MyOtherStruct +{{ + MyStruct c[2][1][3][4]; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task FixedSizedBufferNonPrimitiveTypedefTest(string nativeType) + { + var inputContents = $@"struct MyStruct +{{ + {nativeType} value; +}}; + +typedef MyStruct MyBuffer[3]; + +struct MyOtherStruct +{{ + MyBuffer c; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + [TestCase("bool")] + public Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTest(string nativeType) + { + var inputContents = $@"struct MyStruct +{{ + {nativeType} value; +}}; + +struct MyOtherStruct +{{ + MyStruct c[3]; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("double *")] + [TestCase("short *")] + [TestCase("int *")] + [TestCase("float *")] + public Task FixedSizedBufferPointerTest(string nativeType) + { + var inputContents = $@"struct MyStruct +{{ + {nativeType} c[3]; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("float")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + public Task FixedSizedBufferPrimitiveTest(string nativeType) + { + var inputContents = $@"struct MyStruct +{{ + {nativeType} c[3]; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("float")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + public Task FixedSizedBufferPrimitiveMultidimensionalTest(string nativeType) + { + var inputContents = $@"struct MyStruct +{{ + {nativeType} c[2][1][3][4]; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("float")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + public Task FixedSizedBufferPrimitiveTypedefTest(string nativeType) + { + var inputContents = $@"typedef {nativeType} MyBuffer[3]; + +struct MyStruct +{{ + MyBuffer c; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task GuidTest() + { + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + // Non-Windows doesn't support __declspec(uuid("")) + return Task.CompletedTask; + } + + var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) + +struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 +{{ + int x; +}}; + +struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 +{{ + int x; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents, excludedNames: s_guidTestExcludedNames); + } + + [Test] + public Task InheritanceTest() + { + var inputContents = @"struct MyStruct1A +{ + int x; + int y; +}; + +struct MyStruct1B +{ + int x; + int y; +}; + +struct MyStruct2 : MyStruct1A, MyStruct1B +{ + int z; + int w; +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task InheritanceWithNativeInheritanceAttributeTest() + { + var inputContents = @"struct MyStruct1A +{ + int x; + int y; +}; + +struct MyStruct1B +{ + int x; + int y; +}; + +struct MyStruct2 : MyStruct1A, MyStruct1B +{ + int z; + int w; +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); + } + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task NestedAnonymousTest(string nativeType) + { + var inputContents = $@"typedef union {{ + {nativeType} value; +}} MyUnion; + +struct MyStruct +{{ + {nativeType} x; + {nativeType} y; + + struct + {{ + {nativeType} z; + + struct + {{ + {nativeType} value; + }} w; + + struct + {{ + {nativeType} value1; + + struct + {{ + {nativeType} value; + }}; + }}; + + union + {{ + {nativeType} value2; + }}; + + MyUnion u; + {nativeType} buffer1[4]; + MyUnion buffer2[4]; + }}; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task NestedAnonymousWithBitfieldTest() + { + var inputContents = @"struct MyStruct +{ + int x; + int y; + + struct + { + int z; + + struct + { + int w; + int o0_b0_16 : 16; + int o0_b16_4 : 4; + }; + }; +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task NestedTest(string nativeType) + { + var inputContents = $@"struct MyStruct +{{ + {nativeType} r; + {nativeType} g; + {nativeType} b; + + struct MyNestedStruct + {{ + {nativeType} r; + {nativeType} g; + {nativeType} b; + {nativeType} a; + }}; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + [TestCase("bool")] + public Task NestedWithNativeTypeNameTest(string nativeType) + { + var inputContents = $@"struct MyStruct +{{ + {nativeType} r; + {nativeType} g; + {nativeType} b; + + struct MyNestedStruct + {{ + {nativeType} r; + {nativeType} g; + {nativeType} b; + {nativeType} a; + }}; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task NewKeywordTest() + { + var inputContents = @"struct MyStruct +{ + int Equals; + int Dispose; + int GetHashCode; + int GetType; + int MemberwiseClone; + int ReferenceEquals; + int ToString; +};"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task NoDefinitionTest() + { + var inputContents = "typedef struct MyStruct MyStruct;"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task PackTest() + { + const string InputContents = @"struct MyStruct1 { + unsigned Field1; + + void* Field2; + + unsigned Field3; +}; + +#pragma pack(4) + +struct MyStruct2 { + unsigned Field1; + + void* Field2; + + unsigned Field3; +}; +"; + + return ValidateGeneratedBindingsAsync(InputContents); + } + + [Test] + public Task PointerToSelfTest() + { + var inputContents = @"struct example_s { + example_s* next; + void* data; +};"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task PointerToSelfViaTypedefTest() + { + var inputContents = @"typedef struct example_s example_t; + +struct example_s { + example_t* next; + void* data; +};"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task RemapTest() + { + var inputContents = "typedef struct _MyStruct MyStruct;"; + + var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; + return ValidateGeneratedBindingsAsync(inputContents, remappedNames: remappedNames); + } + + [Test] + public Task RemapNestedAnonymousTest() + { + var inputContents = @"struct MyStruct +{ + double r; + double g; + double b; + + struct + { + double a; + }; +};"; + + var remappedNames = new Dictionary { + ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", + ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" + }; + return ValidateGeneratedBindingsAsync(inputContents, remappedNames: remappedNames); + } + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task SkipNonDefinitionTest(string nativeType) + { + var inputContents = $@"typedef struct MyStruct MyStruct; + +struct MyStruct +{{ + {nativeType} r; + {nativeType} g; + {nativeType} b; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task SkipNonDefinitionPointerTest() + { + var inputContents = @"typedef struct MyStruct* MyStructPtr; +typedef struct MyStruct& MyStructRef; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + [TestCase("bool")] + public Task SkipNonDefinitionWithNativeTypeNameTest(string nativeType) + { + var inputContents = $@"typedef struct MyStruct MyStruct; + +struct MyStruct +{{ + {nativeType} r; + {nativeType} g; + {nativeType} b; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("float")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + [TestCase("bool")] + public Task TypedefTest(string nativeType) + { + var inputContents = $@"typedef {nativeType} MyTypedefAlias; + +struct MyStruct +{{ + MyTypedefAlias r; + MyTypedefAlias g; + MyTypedefAlias b; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task UsingDeclarationTest() + { + var inputContents = @"struct MyStruct1A +{ + void MyMethod() { } +}; + +struct MyStruct1B : MyStruct1A +{ + using MyStruct1A::MyMethod; +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task WithAccessSpecifierTest() + { + var inputContents = @"struct MyStruct1 +{ + int Field1; + int Field2; +}; + +struct MyStruct2 +{ + int Field1; + int Field2; +}; + +struct MyStruct3 +{ + int Field1; + int Field2; +}; +"; + + var withAccessSpecifiers = new Dictionary { + ["MyStruct1"] = AccessSpecifier.Private, + ["MyStruct2"] = AccessSpecifier.Internal, + ["Field1"] = AccessSpecifier.Private, + ["MyStruct3.Field2"] = AccessSpecifier.Internal, + }; + return ValidateGeneratedBindingsAsync(inputContents, withAccessSpecifiers: withAccessSpecifiers); + } + + [Test] + public Task WithPackingTest() + { + var sizeTDef = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? + string.Empty : + "typedef int size_t;\n"; + + var inputContents = @$"{sizeTDef} +struct MyStruct +{{ + size_t FixedBuffer[2]; +}}; +"; + + var withPackings = new Dictionary { + ["MyStruct"] = "CustomPackValue" + }; + return ValidateGeneratedBindingsAsync(inputContents, withPackings: withPackings); + } + + [Test] + public Task SourceLocationAttributeTest() + { + const string InputContents = @"struct MyStruct +{ + int r; + int g; + int b; +}; +"; + + return ValidateGeneratedBindingsAsync(InputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/UnionDeclarationTest.cs new file mode 100644 index 00000000..46280107 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/UnionDeclarationTest.cs @@ -0,0 +1,590 @@ +// 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.Runtime.InteropServices; +using System.Threading.Tasks; +using NUnit.Framework; + +namespace ClangSharp.UnitTests; + +[TestFixtureSource(nameof(FixtureArgs))] +public sealed class UnionDeclarationTest(PInvokeGeneratorOutputMode outputMode, PInvokeGeneratorConfigurationOptions outputVersion) + : PInvokeGeneratorTest(outputMode, outputVersion) +{ + private static readonly string[] s_excludeTestExcludedNames = ["MyUnion"]; + private static readonly string[] s_guidTestExcludedNames = ["DECLSPEC_UUID"]; + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task BasicTest(string nativeType) + { + var inputContents = $@"union MyUnion +{{ + {nativeType} r; + {nativeType} g; + {nativeType} b; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task BasicTestInCMode(string nativeType) + { + var inputContents = $@"typedef union +{{ + {nativeType} r; + {nativeType} g; + {nativeType} b; +}} MyUnion; +"; + + return ValidateGeneratedBindingsAsync(inputContents, commandLineArgs: []); + } + + [TestCase("unsigned char")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + [TestCase("bool")] + public Task BasicWithNativeTypeNameTest(string nativeType) + { + var inputContents = $@"union MyUnion +{{ + {nativeType} r; + {nativeType} g; + {nativeType} b; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task BitfieldTest() + { + var inputContents = @"union MyUnion1 +{ + unsigned int o0_b0_24 : 24; + unsigned int o4_b0_16 : 16; + unsigned int o4_b16_3 : 3; + int o4_b19_3 : 3; + unsigned char o4_b22_1 : 1; + int o4_b23_1 : 1; + int o4_b24_1 : 1; +}; + +union MyUnion2 +{ + unsigned int o0_b0_1 : 1; + int x; + unsigned int o8_b0_1 : 1; +}; + +union MyUnion3 +{ + unsigned int o0_b0_1 : 1; + unsigned int o0_b1_1 : 1; +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task ExcludeTest() + { + var inputContents = "typedef union MyUnion MyUnion;"; + return ValidateGeneratedBindingsAsync(inputContents, excludedNames: s_excludeTestExcludedNames); + } + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task FixedSizedBufferNonPrimitiveTest(string nativeType) + { + var inputContents = $@"union MyUnion +{{ + {nativeType} value; +}}; + +union MyOtherUnion +{{ + MyUnion c[3]; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task FixedSizedBufferNonPrimitiveMultidimensionalTest(string nativeType) + { + var inputContents = $@"union MyUnion +{{ + {nativeType} value; +}}; + +union MyOtherUnion +{{ + MyUnion c[2][1][3][4]; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task FixedSizedBufferNonPrimitiveTypedefTest(string nativeType) + { + var inputContents = $@"union MyUnion +{{ + {nativeType} value; +}}; + +typedef MyUnion MyBuffer[3]; + +union MyOtherUnion +{{ + MyBuffer c; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + [TestCase("bool")] + public Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTest(string nativeType) + { + var inputContents = $@"union MyUnion +{{ + {nativeType} value; +}}; + +union MyOtherUnion +{{ + MyUnion c[3]; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("double *")] + [TestCase("short *")] + [TestCase("int *")] + [TestCase("float *")] + public Task FixedSizedBufferPointerTest(string nativeType) + { + var inputContents = $@"union MyUnion +{{ + {nativeType} c[3]; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("float")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + public Task FixedSizedBufferPrimitiveTest(string nativeType) + { + var inputContents = $@"union MyUnion +{{ + {nativeType} c[3]; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("float")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + public Task FixedSizedBufferPrimitiveMultidimensionalTest(string nativeType) + { + var inputContents = $@"union MyUnion +{{ + {nativeType} c[2][1][3][4]; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("float")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + public Task FixedSizedBufferPrimitiveTypedefTest(string nativeType) + { + var inputContents = $@"typedef {nativeType} MyBuffer[3]; + +union MyUnion +{{ + MyBuffer c; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + [Test] + public Task GuidTest() + { + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + // Non-Windows doesn't support __declspec(uuid("")) + return Task.CompletedTask; + } + + var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) + +union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 +{{ + int x; +}}; + +union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 +{{ + int x; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents, excludedNames: s_guidTestExcludedNames); + } + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task NestedAnonymousTest(string nativeType) + { + var inputContents = $@"typedef struct {{ + {nativeType} value; +}} MyStruct; + +union MyUnion +{{ + {nativeType} r; + {nativeType} g; + {nativeType} b; + + union + {{ + {nativeType} a; + + MyStruct s; + + {nativeType} buffer[4]; + }}; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task NestedAnonymousWithBitfieldTest() + { + var inputContents = @"union MyUnion +{ + int x; + int y; + + union + { + int z; + + union + { + int w; + int o0_b0_16 : 16; + int o0_b16_4 : 4; + }; + }; +}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task NestedTest(string nativeType) + { + var inputContents = $@"union MyUnion +{{ + {nativeType} r; + {nativeType} g; + {nativeType} b; + + union MyNestedUnion + {{ + {nativeType} r; + {nativeType} g; + {nativeType} b; + {nativeType} a; + }}; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + [TestCase("bool")] + public Task NestedWithNativeTypeNameTest(string nativeType) + { + var inputContents = $@"union MyUnion +{{ + {nativeType} r; + {nativeType} g; + {nativeType} b; + + union MyNestedUnion + {{ + {nativeType} r; + {nativeType} g; + {nativeType} b; + {nativeType} a; + }}; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task NewKeywordTest() + { + var inputContents = @"union MyUnion +{ + int Equals; + int Dispose; + int GetHashCode; + int GetType; + int MemberwiseClone; + int ReferenceEquals; + int ToString; +};"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task NoDefinitionTest() + { + var inputContents = "typedef union MyUnion MyUnion;"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task PointerToSelfTest() + { + var inputContents = @"union example_s { + example_s* next; + void* data; +};"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task PointerToSelfViaTypedefTest() + { + var inputContents = @"typedef union example_s example_t; + +union example_s { + example_t* next; + void* data; +};"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task RemapTest() + { + var inputContents = "typedef union _MyUnion MyUnion;"; + + var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; + return ValidateGeneratedBindingsAsync(inputContents, remappedNames: remappedNames); + } + + [Test] + public Task RemapNestedAnonymousTest() + { + var inputContents = @"union MyUnion +{ + double r; + double g; + double b; + + union + { + double a; + }; +};"; + + var remappedNames = new Dictionary { + ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", + ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" + }; + return ValidateGeneratedBindingsAsync(inputContents, remappedNames: remappedNames); + } + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task SkipNonDefinitionTest(string nativeType) + { + var inputContents = $@"typedef union MyUnion MyUnion; + +union MyUnion +{{ + {nativeType} r; + {nativeType} g; + {nativeType} b; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task SkipNonDefinitionPointerTest() + { + var inputContents = @"typedef union MyUnion* MyUnionPtr; +typedef union MyUnion& MyUnionRef; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + [TestCase("bool")] + public Task SkipNonDefinitionWithNativeTypeNameTest(string nativeType) + { + var inputContents = $@"typedef union MyUnion MyUnion; + +union MyUnion +{{ + {nativeType} r; + {nativeType} g; + {nativeType} b; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("float")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + [TestCase("bool")] + public Task TypedefTest(string nativeType) + { + var inputContents = $@"typedef {nativeType} MyTypedefAlias; + +union MyUnion +{{ + MyTypedefAlias r; + MyTypedefAlias g; + MyTypedefAlias b; +}}; +"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task UnionWithAnonStructWithAnonUnion() + { + var inputContents = $@"typedef union _MY_UNION +{{ + long AsArray[2]; + struct + {{ + long First; + union + {{ + struct + {{ + long Second; + }} A; + + struct + {{ + long Second; + }} B; + }}; + }}; +}} MY_UNION;"; + + return ValidateGeneratedBindingsAsync(inputContents); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/VarDeclarationTest.cs new file mode 100644 index 00000000..2395d8d7 --- /dev/null +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/VarDeclarationTest.cs @@ -0,0 +1,208 @@ +// 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; + +[TestFixtureSource(nameof(FixtureArgs))] +public sealed class VarDeclarationTest(PInvokeGeneratorOutputMode outputMode, PInvokeGeneratorConfigurationOptions outputVersion) + : PInvokeGeneratorTest(outputMode, outputVersion) +{ + private static readonly string[] s_guidMacroTestExcludedNames = ["GUID"]; + private static readonly string[] s_uncheckedConversionMacroTest2ExcludedNames = ["MyMacro1", "MyMacro2"]; + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task BasicTest(string nativeType) + { + var inputContents = $@"{nativeType} MyVariable = 0;"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("unsigned char")] + [TestCase("long long")] + [TestCase("signed char")] + [TestCase("unsigned short")] + [TestCase("unsigned int")] + [TestCase("unsigned long long")] + public Task BasicWithNativeTypeNameTest(string nativeType) + { + var inputContents = $@"{nativeType} MyVariable = 0;"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task GuidMacroTest() + { + var inputContents = $@"struct GUID {{ + unsigned long Data1; + unsigned short Data2; + unsigned short Data3; + unsigned char Data4[8]; +}}; + +const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; +"; + + var remappedNames = new Dictionary { ["GUID"] = "Guid" }; + return ValidateGeneratedBindingsAsync(inputContents, excludedNames: s_guidMacroTestExcludedNames, remappedNames: remappedNames); + } + + [TestCase("0")] + [TestCase("0U")] + [TestCase("0LL")] + [TestCase("0ULL")] + [TestCase("0LLU")] + [TestCase("0.0")] + [TestCase("0.f")] + public Task MacroTest(string nativeValue) + { + var inputContents = $@"#define MyMacro1 {nativeValue} +#define MyMacro2 MyMacro1"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task MultilineMacroTest() + { + var inputContents = $@"#define MyMacro1 0 + \ +1"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [TestCase("double")] + [TestCase("short")] + [TestCase("int")] + [TestCase("float")] + public Task NoInitializerTest(string nativeType) + { + var inputContents = $@"{nativeType} MyVariable;"; + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task Utf8StringLiteralMacroTest() + { + var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task Utf16StringLiteralMacroTest() + { + var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task WideStringLiteralConstTest() + { + var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; +const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; +const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task StringLiteralConstTest() + { + var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; +const char* MyConst2 = ""Test\0\\\r\n\t\""""; +const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task WideStringLiteralStaticConstTest() + { + var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; +static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; +static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task StringLiteralStaticConstTest() + { + var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; +static const char* MyConst2 = ""Test\0\\\r\n\t\""""; +static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task UncheckedConversionMacroTest() + { + var inputContents = $@"#define MyMacro1 (long)0x80000000L +#define MyMacro2 (int)0x80000000"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task UncheckedFunctionLikeCastMacroTest() + { + var inputContents = $@"#define MyMacro1 unsigned(-1)"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task UncheckedConversionMacroTest2() + { + var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) +#define MyMacro2(n) MyMacro1(1, 2, n) +#define MyMacro3 MyMacro2(3)"; + + return ValidateGeneratedBindingsAsync(inputContents, excludedNames: s_uncheckedConversionMacroTest2ExcludedNames); + } + + [Test] + public Task UncheckedPointerMacroTest() + { + var inputContents = $@"#define Macro1 ((int*) -1)"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task UncheckedReinterpretCastMacroTest() + { + var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task MultidimensionlArrayTest() + { + var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; + + return ValidateGeneratedBindingsAsync(inputContents); + } + + [Test] + public Task ConditionalDefineConstTest() + { + var inputContents = @"typedef int TESTRESULT; +#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) +#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; + var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; + + return ValidateGeneratedBindingsAsync(inputContents, expectedDiagnostics: diagnostics); + } +} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/CXXMethodDeclarationTest.cs deleted file mode 100644 index 0403f89d..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,1281 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlCompatibleUnix_CXXMethodDeclarationTest : CXXMethodDeclarationXmlTest -{ - protected override Task ConstructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - int _value; - - MyStruct(int value) - { - _value = value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - void - - int - - _value = value; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(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 ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8$MyTemplateDoWorkEv" : "_ZN10MyTemplateIiE6DoWorkEPi"; - - var expectedOutputContents = $@" - - - - - int* - - MyStruct* - - - int* - - null - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = Environment.Is64BitProcess - ? "?MyVoidMethod@MyStruct@@QEAAXXZ" - : "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - MyStruct* - - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(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 ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - int MyFunction() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(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 ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@" - - - - - 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); - }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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 - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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 - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedXmlCompatibleUnixBindingsAsync(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 ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@" - - - - - void - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(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 ValidateGeneratedXmlCompatibleUnixBindingsAsync(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 ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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); - }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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); - }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/DeprecatedToObsoleteTest.cs deleted file mode 100644 index 2e8b4848..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,551 +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; - -[Platform("unix")] -public sealed class XmlCompatibleUnix_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - Obsolete - int - - int - - - - Obsolete(""This is obsolete."") - int - - int - - - - int - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@" - - - - - int - - 0 - - - - Obsolete - int - - 0 - - - - Obsolete(""This is obsolete."") - int - - 0 - - - - int - - 0 - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - Obsolete - void - - - - Obsolete(""This is obsolete."") - void - - - - void - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@" - - - - - int - return 0; - - - Obsolete - int - return 0; - - - Obsolete(""This is obsolete."") - int - return 0; - - - int - return 0; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @" - - - - void - - - Obsolete - void - - - Obsolete(""This is obsolete."") - void - - - void - - - - IntPtr - - - - - Obsolete - IntPtr - - - - - Obsolete(""This is obsolete."") - IntPtr - - - - - IntPtr - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @" - - - - - void - - - Obsolete - void - - - Obsolete(""This is obsolete."") - void - - - void - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/EnumDeclarationTest.cs deleted file mode 100644 index dab1c96c..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/EnumDeclarationTest.cs +++ /dev/null @@ -1,730 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlCompatibleUnix_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum : int -{ - MyEnum_Value1, - MyEnum_Value2, - MyEnum_Value3, -} MyEnum; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - var remappedNames = new Dictionary { ["_MyEnum"] = "MyEnum" }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @" - - - - Flags - int - - int - - 1 - - - - - int - - int - - 1 - - - - - -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - (int)(MyEnum)(10) - - - - int - - (int)(MyEnum)(MyEnum_Value0) - - - - int - - ((int)(MyEnum)(10)) + MyEnum_Value1 - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 10 - - - - - int - - int - - MyEnum1_Value0 - - - - int - - MyEnum1_Value0 + (int)(MyEnum1)(10) - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - int - - 0x80000000 - - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - - - -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - 0x80000000 - - - - - -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - MyEnum1_Value1 - - - - - - uint - - 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 ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @" - - - - - uint - - 1 - - - - int - - (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 ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index 3fd49d4e..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,2013 +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; - -[Platform("unix")] -public sealed class XmlCompatibleUnix_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - - int - - return pData[index]; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - bool - - - bool - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - while (true) - {{ - break; - }} - - return 0; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = $@" - - - - - void - - - - void - MyCalledFunction(); - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = $@" - - - - - void - - int - - - int - - - - - void - MyCalledFunction(0, 1); - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 1: - case 2: - {{ - return 3; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 2: - case 3: - {{ - return 5; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = $@" - - - - int - - int - - - int - - - int - - - - - int - - MyEnum - - return (x == MyEnum_Value0 || x == MyEnum_Value1 || x == MyEnum_Value2) ? 1 : 0; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = $@" - - - - - int - - bool - - - int - - - int - - return condition ? lhs : rhs; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - while (true) - { - continue; - } - - return 0; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - void* - - void* - - return input; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@" - - - - - 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); - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @" - - - - - int - int x = 0; - int y = 1, z = 2; - - return x + y + z; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - - return rhs; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - - bool - - - int - - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - int - - MyStruct - - return instance.value; - - - int - - MyStruct* - - return instance->value; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - bool - - MyStruct* - - - MyStruct* - - return lhs->value == rhs->value; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @" - - - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - return {value}; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - double - return {value}; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - float - return {value}; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @" - - - - - void - return; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @" - - - - - int - return -1; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @" - - - - - _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; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - - - MyStruct - MyStruct myStruct = new MyStruct(); - - return myStruct; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @" - - - - - int* - - int - - return &value; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - return *value; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @" - - - - - bool - - bool - - return !value; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return value{opcode}; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return {opcode}value; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index 4df425ee..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,464 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlCompatibleUnix_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @" - - - - - void - - float* - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @" - - - - - void - - IntPtr - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@" - - - - - void - - MyTemplate<{expectedManagedType}> - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@" - - - - - MyTemplate<IntPtr> - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @" - - - - - void - - float - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() => Task.CompletedTask; - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionPointerDeclarationTest.cs deleted file mode 100644 index 8d727175..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,91 +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; - -[Platform("unix")] -public sealed class XmlCompatibleUnix_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - void - - - - IntPtr - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - void - - - - IntPtr - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @" - - - - void - - - - IntPtr - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/StructDeclarationTest.cs deleted file mode 100644 index 17a8ed66..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/StructDeclarationTest.cs +++ /dev/null @@ -1,1986 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlCompatibleUnix_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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(""o4_b22_1"", offset: 22, length: 1) - NativeBitfield(""o4_b23_1"", offset: 23, length: 1) - NativeBitfield(""o4_b24_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); - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @" - - - - - IntPtr - - - - - void - - - - -"; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - - MyStruct - - - MyStruct - - - MyStruct - - - ref MyStruct - - int - - - fixed (MyStruct* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - 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]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - - MyStruct - - - MyStruct - - - MyStruct - - - ref MyStruct - - int - - - fixed (MyStruct* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - - MyStruct - - - MyStruct - - - MyStruct - - - ref MyStruct - - int - - - fixed (MyStruct* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Unix doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Struct - - - ref {expectedManagedType} - - 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 MyUnion - - fixed (_Anonymous_e__Struct* pField = &Anonymous) - {{ - return ref pField->u; - }} - - - - ref {expectedManagedType} - - 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; - }} - - - - - {expectedManagedType} - - - _w_e__Struct - - - MyUnion - - - {expectedManagedType} - - - MyUnion - - - - {expectedManagedType} - - - - - MyUnion - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - fixed (MyUnion* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Struct - - - ref int - - fixed (_Anonymous_e__Struct* pField = &Anonymous) - { - return ref pField->z; - } - - - - ref int - - fixed (_Anonymous_e__Struct._Anonymous_e__Struct* pField = &Anonymous.Anonymous) - { - return ref pField->w; - } - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_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); - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var packing = Environment.Is64BitProcess ? " layout=\"Sequential\" pack=\"4\"" : string.Empty; - - var expectedOutputContents = $@" - - - - - uint - - - void* - - - uint - - - - - uint - - - void* - - - uint - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Struct - - - ref double - - fixed (_Anonymous_e__Struct* pField = &Anonymous) - { - return ref pField->a; - } - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - - void - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - int - - - int - - - - -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"typedef int size_t; - -struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @" - - - - - UIntPtr - - - - UIntPtr - - - UIntPtr - - - ref UIntPtr - - int - - - fixed (UIntPtr* pThis = &e0) - { - return ref pThis[index]; - } - - - - - - -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @" - - - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/UnionDeclarationTest.cs deleted file mode 100644 index 07b48d38..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/UnionDeclarationTest.cs +++ /dev/null @@ -1,1459 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlCompatibleUnix_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @" pack=""1""" : ""; - - var expectedOutputContents = $@" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - fixed (MyUnion* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - 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]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - fixed (MyUnion* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - fixed (MyUnion* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Unix doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Union - - - ref {expectedManagedType} - - fixed (_Anonymous_e__Union* pField = &Anonymous) - {{ - return ref pField->a; - }} - - - - ref MyStruct - - fixed (_Anonymous_e__Union* pField = &Anonymous) - {{ - return ref pField->s; - }} - - - - ref {expectedManagedType} - - fixed (_Anonymous_e__Union* pField = &Anonymous) - {{ - return ref pField->buffer[0]; - }} - - - - - {expectedManagedType} - - - MyStruct - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Union - - - ref int - - fixed (_Anonymous_e__Union* pField = &Anonymous) - { - return ref pField->z; - } - - - - ref int - - fixed (_Anonymous_e__Union._Anonymous_e__Union* pField = &Anonymous.Anonymous) - { - return ref pField->w; - } - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_e__Union - - - - int - - - int - - - int - - return (_bitfield << 16) >> 16; - - - - _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF); - - - - int - - return (_bitfield << 12) >> 28; - - - - _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16); - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Union - - - ref double - - fixed (_Anonymous_e__Union* pField = &Anonymous) - { - return ref pField->a; - } - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@" - - - - - IntPtr - - - _Anonymous_e__Struct - - - ref IntPtr - - fixed (_Anonymous_e__Struct* pField = &Anonymous) - {{ - return ref pField->First; - }} - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct - - fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) - {{ - return ref pField->A; - }} - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct - - fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) - {{ - return ref pField->B; - }} - - - - - IntPtr - - - _Anonymous_e__Union - - - - _A_e__Struct - - - _B_e__Struct - - - - IntPtr - - - - - IntPtr - - - - - - - IntPtr - - - IntPtr - - - ref IntPtr - - int - - - fixed (IntPtr* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/VarDeclarationTest.cs deleted file mode 100644 index 37103690..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleUnix/VarDeclarationTest.cs +++ /dev/null @@ -1,533 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlCompatibleUnix_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@" - - - - - Guid - - new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) - - - - - -"; - - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - {expectedManagedValue} - - - - {expectedManagedType} - - {expectedManagedValue} - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@" - - - - - int - - 0 + 1 - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - uint[] - - new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }} - - - - uint[] - - new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }} - - - - uint[] - - new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - byte[] - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - uint[] - - new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }} - - - - uint[] - - new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }} - - - - uint[] - - new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - byte[] - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@" - - - - - IntPtr - - - - (nint)(0x80000000) - - - - - - int - - - - (int)(0x80000000) - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@" - - - - - uint - - - - (uint)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(((nuint)(1) << 31) | ((nuint)(2) << 16) | ((nuint)(3)))) - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@" - - - - - int* - - - ((int*)(-1)) - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@" - - - - - int* - - - - (int*)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@" - - - - - int[][] - - new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) - - - - - - -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedXmlCompatibleUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/CXXMethodDeclarationTest.cs deleted file mode 100644 index 20c1ee5c..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,1282 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlCompatibleWindows_CXXMethodDeclarationTest : CXXMethodDeclarationXmlTest -{ - protected override Task ConstructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - int _value; - - MyStruct(int value) - { - _value = value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - void - - int - - _value = value; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(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 ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - - var entryPoint = Environment.Is64BitProcess ? "?DoWork@?$MyTemplate@H@@QEAAPEAHPEAH@Z" : "?DoWork@?$MyTemplate@H@@QEAPEHPEH@Z"; - - var expectedOutputContents = $@" - - - - - int* - - MyStruct* - - - int* - - null - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = Environment.Is64BitProcess - ? "?MyVoidMethod@MyStruct@@QEAAXXZ" - : "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - MyStruct* - - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(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 ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - int MyFunction() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(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 ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@" - - - - - 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); - }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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 - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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 - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedXmlCompatibleWindowsBindingsAsync(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 ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@" - - - - - void - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(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 ValidateGeneratedXmlCompatibleWindowsBindingsAsync(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 ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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); - }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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); - }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/DeprecatedToObsoleteTest.cs deleted file mode 100644 index 5e571f29..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,551 +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; - -[Platform("win")] -public sealed class XmlCompatibleWindows_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - Obsolete - int - - int - - - - Obsolete(""This is obsolete."") - int - - int - - - - int - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@" - - - - - int - - 0 - - - - Obsolete - int - - 0 - - - - Obsolete(""This is obsolete."") - int - - 0 - - - - int - - 0 - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - Obsolete - void - - - - Obsolete(""This is obsolete."") - void - - - - void - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@" - - - - - int - return 0; - - - Obsolete - int - return 0; - - - Obsolete(""This is obsolete."") - int - return 0; - - - int - return 0; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @" - - - - void - - - Obsolete - void - - - Obsolete(""This is obsolete."") - void - - - void - - - - IntPtr - - - - - Obsolete - IntPtr - - - - - Obsolete(""This is obsolete."") - IntPtr - - - - - IntPtr - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @" - - - - - void - - - Obsolete - void - - - Obsolete(""This is obsolete."") - void - - - void - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/EnumDeclarationTest.cs deleted file mode 100644 index c196d58e..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/EnumDeclarationTest.cs +++ /dev/null @@ -1,730 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlCompatibleWindows_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum : int -{ - MyEnum_Value1, - MyEnum_Value2, - MyEnum_Value3, -} MyEnum; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - var remappedNames = new Dictionary { ["_MyEnum"] = "MyEnum" }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @" - - - - Flags - int - - int - - 1 - - - - - int - - int - - 1 - - - - - -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - (int)(MyEnum)(10) - - - - int - - (int)(MyEnum)(MyEnum_Value0) - - - - int - - ((int)(MyEnum)(10)) + MyEnum_Value1 - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 10 - - - - - int - - int - - MyEnum1_Value0 - - - - int - - MyEnum1_Value0 + (int)(MyEnum1)(10) - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - int - - 0x80000000 - - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - - - -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - 0x80000000 - - - - - -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - MyEnum1_Value1 - - - - - - int - - 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 ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @" - - - - - int - - 1 - - - - int - - (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 ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index ad035246..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,2013 +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; - -[Platform("win")] -public sealed class XmlCompatibleWindows_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - - int - - return pData[index]; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - bool - - - bool - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - while (true) - {{ - break; - }} - - return 0; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = $@" - - - - - void - - - - void - MyCalledFunction(); - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = $@" - - - - - void - - int - - - int - - - - - void - MyCalledFunction(0, 1); - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 1: - case 2: - {{ - return 3; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 2: - case 3: - {{ - return 5; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = $@" - - - - int - - int - - - int - - - int - - - - - int - - MyEnum - - return (x == MyEnum_Value0 || x == MyEnum_Value1 || x == MyEnum_Value2) ? 1 : 0; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = $@" - - - - - int - - bool - - - int - - - int - - return condition ? lhs : rhs; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - while (true) - { - continue; - } - - return 0; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - void* - - void* - - return input; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@" - - - - - 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); - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @" - - - - - int - int x = 0; - int y = 1, z = 2; - - return x + y + z; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - - return rhs; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - - bool - - - int - - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - int - - MyStruct - - return instance.value; - - - int - - MyStruct* - - return instance->value; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - bool - - MyStruct* - - - MyStruct* - - return lhs->value == rhs->value; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @" - - - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - return {value}; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - double - return {value}; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - float - return {value}; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @" - - - - - void - return; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @" - - - - - int - return -1; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @" - - - - - _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; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - - - MyStruct - MyStruct myStruct = new MyStruct(); - - return myStruct; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @" - - - - - int* - - int - - return &value; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - return *value; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @" - - - - - bool - - bool - - return !value; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return value{opcode}; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return {opcode}value; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index a6f62ac8..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,464 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlCompatibleWindows_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @" - - - - - void - - float* - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @" - - - - - void - - IntPtr - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@" - - - - - void - - MyTemplate<{expectedManagedType}> - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@" - - - - - MyTemplate<IntPtr> - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @" - - - - - void - - float - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() => Task.CompletedTask; - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionPointerDeclarationTest.cs deleted file mode 100644 index d218388b..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,91 +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; - -[Platform("win")] -public sealed class XmlCompatibleWindows_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - void - - - - IntPtr - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - void - - - - IntPtr - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @" - - - - void - - - - IntPtr - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/StructDeclarationTest.cs deleted file mode 100644 index 263ba30c..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/StructDeclarationTest.cs +++ /dev/null @@ -1,1995 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlCompatibleWindows_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @" - - - - - IntPtr - - - - - void - - - - -"; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - - MyStruct - - - MyStruct - - - MyStruct - - - ref MyStruct - - int - - - fixed (MyStruct* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - 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]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - - MyStruct - - - MyStruct - - - MyStruct - - - ref MyStruct - - int - - - fixed (MyStruct* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - - MyStruct - - - MyStruct - - - MyStruct - - - ref MyStruct - - int - - - fixed (MyStruct* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Struct - - - ref {expectedManagedType} - - 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 MyUnion - - fixed (_Anonymous_e__Struct* pField = &Anonymous) - {{ - return ref pField->u; - }} - - - - ref {expectedManagedType} - - 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; - }} - - - - - {expectedManagedType} - - - _w_e__Struct - - - MyUnion - - - {expectedManagedType} - - - MyUnion - - - - {expectedManagedType} - - - - - MyUnion - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - fixed (MyUnion* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Struct - - - ref int - - fixed (_Anonymous_e__Struct* pField = &Anonymous) - { - return ref pField->z; - } - - - - ref int - - fixed (_Anonymous_e__Struct._Anonymous_e__Struct* pField = &Anonymous.Anonymous) - { - return ref pField->w; - } - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_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); - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var packing = Environment.Is64BitProcess ? " layout=\"Sequential\" pack=\"4\"" : string.Empty; - - var expectedOutputContents = $@" - - - - - uint - - - void* - - - uint - - - - - uint - - - void* - - - uint - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Struct - - - ref double - - fixed (_Anonymous_e__Struct* pField = &Anonymous) - { - return ref pField->a; - } - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - - void - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - int - - - int - - - - -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @" - - - - - UIntPtr - - - - UIntPtr - - - UIntPtr - - - ref UIntPtr - - int - - - fixed (UIntPtr* pThis = &e0) - { - return ref pThis[index]; - } - - - - - - -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @" - - - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/UnionDeclarationTest.cs deleted file mode 100644 index 3e1ae4f3..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/UnionDeclarationTest.cs +++ /dev/null @@ -1,1445 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlCompatibleWindows_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @" pack=""1""" : ""; - - var expectedOutputContents = $@" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - fixed (MyUnion* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - 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]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - fixed (MyUnion* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - fixed (MyUnion* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Union - - - ref {expectedManagedType} - - fixed (_Anonymous_e__Union* pField = &Anonymous) - {{ - return ref pField->a; - }} - - - - ref MyStruct - - fixed (_Anonymous_e__Union* pField = &Anonymous) - {{ - return ref pField->s; - }} - - - - ref {expectedManagedType} - - fixed (_Anonymous_e__Union* pField = &Anonymous) - {{ - return ref pField->buffer[0]; - }} - - - - - {expectedManagedType} - - - MyStruct - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Union - - - ref int - - fixed (_Anonymous_e__Union* pField = &Anonymous) - { - return ref pField->z; - } - - - - ref int - - fixed (_Anonymous_e__Union._Anonymous_e__Union* pField = &Anonymous.Anonymous) - { - return ref pField->w; - } - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_e__Union - - - - int - - - int - - - int - - return (_bitfield << 16) >> 16; - - - - _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF); - - - - int - - return (_bitfield << 12) >> 28; - - - - _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16); - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Union - - - ref double - - fixed (_Anonymous_e__Union* pField = &Anonymous) - { - return ref pField->a; - } - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@" - - - - - int - - - _Anonymous_e__Struct - - - ref int - - fixed (_Anonymous_e__Struct* pField = &Anonymous) - {{ - return ref pField->First; - }} - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct - - fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) - {{ - return ref pField->A; - }} - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct - - fixed (_Anonymous_e__Struct._Anonymous_e__Union* pField = &Anonymous.Anonymous) - {{ - return ref pField->B; - }} - - - - - int - - - _Anonymous_e__Union - - - - _A_e__Struct - - - _B_e__Struct - - - - int - - - - - int - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/VarDeclarationTest.cs deleted file mode 100644 index fc6e0f25..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlCompatibleWindows/VarDeclarationTest.cs +++ /dev/null @@ -1,533 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlCompatibleWindows_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@" - - - - - Guid - - new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) - - - - - -"; - - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - {expectedManagedValue} - - - - {expectedManagedType} - - {expectedManagedValue} - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@" - - - - - int - - 0 + 1 - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - byte[] - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - byte[] - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@" - - - - - int - - - - (int)(0x80000000) - - - - - - int - - - - (int)(0x80000000) - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@" - - - - - uint - - - - (uint)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))) - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@" - - - - - int* - - - ((int*)(-1)) - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@" - - - - - int* - - - - (int*)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@" - - - - - int[][] - - new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }} - - - - - -"; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) - - - - - - -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedXmlCompatibleWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/CXXMethodDeclarationTest.cs deleted file mode 100644 index a27fcb0a..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,1102 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlDefaultUnix_CXXMethodDeclarationTest : CXXMethodDeclarationXmlTest -{ - protected override Task ConstructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - int _value; - - MyStruct(int value) - { - _value = value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - void - - int - - _value = value; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(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 ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8$MyTemplateDoWorkEv" : "_ZN10MyTemplateIiE6DoWorkEPi"; - - var expectedOutputContents = $@" - - - - - int* - - MyStruct* - - - int* - - null - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = Environment.Is64BitProcess - ? "?MyVoidMethod@MyStruct@@QEAAXXZ" - : "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - MyStruct* - - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(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 ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - int MyFunction() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(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 ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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> - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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> - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedXmlDefaultUnixBindingsAsync(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 ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@" - - - - - void - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(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 ValidateGeneratedXmlDefaultUnixBindingsAsync(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 ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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)); - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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)); - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/DeprecatedToObsoleteTest.cs deleted file mode 100644 index 7cd8fca6..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,537 +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; - -[Platform("unix")] -public sealed class XmlDefaultUnix_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - Obsolete - int - - int - - - - Obsolete(""This is obsolete."") - int - - int - - - - int - - int - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@" - - - - - int - - 0 - - - - Obsolete - int - - 0 - - - - Obsolete(""This is obsolete."") - int - - 0 - - - - int - - 0 - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - Obsolete - void - - - - Obsolete(""This is obsolete."") - void - - - - void - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@" - - - - - int - return 0; - - - Obsolete - int - return 0; - - - Obsolete(""This is obsolete."") - int - return 0; - - - int - return 0; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - - Obsolete - delegate* unmanaged[Cdecl]<void> - - - - - Obsolete(""This is obsolete."") - delegate* unmanaged[Cdecl]<void> - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @" - - - - - void - - - Obsolete - void - - - Obsolete(""This is obsolete."") - void - - - void - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/EnumDeclarationTest.cs deleted file mode 100644 index ae891ca8..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/EnumDeclarationTest.cs +++ /dev/null @@ -1,730 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlDefaultUnix_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum : int -{ - MyEnum_Value1, - MyEnum_Value2, - MyEnum_Value3, -} MyEnum; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - var remappedNames = new Dictionary { ["_MyEnum"] = "MyEnum" }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @" - - - - Flags - int - - int - - 1 - - - - - int - - int - - 1 - - - - - -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - (int)(MyEnum)(10) - - - - int - - (int)(MyEnum)(MyEnum_Value0) - - - - int - - ((int)(MyEnum)(10)) + MyEnum_Value1 - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 10 - - - - - int - - int - - MyEnum1_Value0 - - - - int - - MyEnum1_Value0 + (int)(MyEnum1)(10) - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - int - - 0x80000000 - - - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - - - -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - 0x80000000 - - - - - -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - MyEnum1_Value1 - - - - - - uint - - 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 ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @" - - - - - uint - - 1 - - - - int - - (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 ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index f54f80ff..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,1992 +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; - -[Platform("unix")] -public sealed class XmlDefaultUnix_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - - int - - return pData[index]; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - bool - - - bool - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - while (true) - {{ - break; - }} - - return 0; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = $@" - - - - - void - - - - void - MyCalledFunction(); - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = $@" - - - - - void - - int - - - int - - - - - void - MyCalledFunction(0, 1); - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 1: - case 2: - {{ - return 3; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 2: - case 3: - {{ - return 5; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = $@" - - - - int - - int - - - int - - - int - - - - - int - - MyEnum - - return (x == MyEnum_Value0 || x == MyEnum_Value1 || x == MyEnum_Value2) ? 1 : 0; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = $@" - - - - - int - - bool - - - int - - - int - - return condition ? lhs : rhs; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - while (true) - { - continue; - } - - return 0; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - void* - - void* - - return input; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@" - - - - - 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); - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @" - - - - - int - int x = 0; - int y = 1, z = 2; - - return x + y + z; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - - return rhs; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - - bool - - - int - - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - int - - MyStruct - - return instance.value; - - - int - - MyStruct* - - return instance->value; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - bool - - MyStruct* - - - MyStruct* - - return lhs->value == rhs->value; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @" - - - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - return {value}; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - double - return {value}; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - float - return {value}; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @" - - - - - void - return; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @" - - - - - int - return -1; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @" - - - - - _Anonymous_e__Struct - - - ref int - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - - - - - int - - - - - - void - MyUnion myUnion = new MyUnion(); - - myUnion.Anonymous.a = 10; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - - - MyStruct - MyStruct myStruct = new MyStruct(); - - return myStruct; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @" - - - - - int* - - int - - return &value; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - return *value; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @" - - - - - bool - - bool - - return !value; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return value{opcode}; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return {opcode}value; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index 8ef79a6b..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,464 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlDefaultUnix_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @" - - - - - void - - float* - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @" - - - - - void - - delegate* unmanaged[Cdecl]<void> - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@" - - - - - void - - MyTemplate<{expectedManagedType}> - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@" - - - - - MyTemplate<IntPtr> - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @" - - - - - void - - float - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() => Task.CompletedTask; - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionPointerDeclarationTest.cs deleted file mode 100644 index 7ddd213a..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,82 +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; - -[Platform("unix")] -public sealed class XmlDefaultUnix_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Stdcall]<void> - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/StructDeclarationTest.cs deleted file mode 100644 index a3cca916..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/StructDeclarationTest.cs +++ /dev/null @@ -1,1967 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlDefaultUnix_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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(""o4_b22_1"", offset: 22, length: 1) - NativeBitfield(""o4_b23_1"", offset: 23, length: 1) - NativeBitfield(""o4_b24_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); - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - - void - - - - -"; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - - MyStruct - - - MyStruct - - - MyStruct - - - ref MyStruct - - int - - - return ref AsSpan()[index]; - - - - Span<MyStruct> - MemoryMarshal.CreateSpan(ref e0, 3); - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - 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 - - - return ref AsSpan()[index]; - - - - Span<MyStruct> - MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - - MyStruct - - - MyStruct - - - MyStruct - - - ref MyStruct - - int - - - return ref AsSpan()[index]; - - - - Span<MyStruct> - MemoryMarshal.CreateSpan(ref e0, 3); - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - - MyStruct - - - MyStruct - - - MyStruct - - - ref MyStruct - - int - - - return ref AsSpan()[index]; - - - - Span<MyStruct> - MemoryMarshal.CreateSpan(ref e0, 3); - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Unix doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Struct - - - ref {expectedManagedType} - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); - - - - ref _Anonymous_e__Struct._w_e__Struct - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); - - - - ref MyUnion - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); - - - - Span<{expectedManagedType}> - - return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); - - - - Span<MyUnion> - - return Anonymous.buffer2.AsSpan(); - - - - - {expectedManagedType} - - - _w_e__Struct - - - MyUnion - - - {expectedManagedType} - - - MyUnion - - - - {expectedManagedType} - - - - - MyUnion - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - return ref AsSpan()[index]; - - - - Span<MyUnion> - MemoryMarshal.CreateSpan(ref e0, 4); - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Struct - - - ref int - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); - - - - ref int - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_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); - - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var packing = Environment.Is64BitProcess ? " layout=\"Sequential\" pack=\"4\"" : string.Empty; - - var expectedOutputContents = $@" - - - - - uint - - - void* - - - uint - - - - - uint - - - void* - - - uint - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Struct - - - ref double - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - - void - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - int - - - int - - - - -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"typedef int size_t; - -struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @" - - - - - nuint - - - - nuint - - - nuint - - - ref nuint - - int - - - return ref AsSpan()[index]; - - - - Span<nuint> - MemoryMarshal.CreateSpan(ref e0, 2); - - - - - -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @" - - - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/UnionDeclarationTest.cs deleted file mode 100644 index 14b87e28..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/UnionDeclarationTest.cs +++ /dev/null @@ -1,1437 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlDefaultUnix_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @" pack=""1""" : ""; - - var expectedOutputContents = $@" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - return ref AsSpan()[index]; - - - - Span<MyUnion> - MemoryMarshal.CreateSpan(ref e0, 3); - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - 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 - - - return ref AsSpan()[index]; - - - - Span<MyUnion> - MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - return ref AsSpan()[index]; - - - - Span<MyUnion> - MemoryMarshal.CreateSpan(ref e0, 3); - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - return ref AsSpan()[index]; - - - - Span<MyUnion> - MemoryMarshal.CreateSpan(ref e0, 3); - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Unix doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Union - - - ref {expectedManagedType} - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - - - - ref MyStruct - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); - - - - Span<{expectedManagedType}> - - return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); - - - - - {expectedManagedType} - - - MyStruct - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Union - - - ref int - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); - - - - ref int - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_e__Union - - - - int - - - int - - - int - - return (_bitfield << 16) >> 16; - - - - _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF); - - - - int - - return (_bitfield << 12) >> 28; - - - - _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16); - - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Union - - - ref double - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@" - - - - - nint - - - _Anonymous_e__Struct - - - ref nint - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.First, 1)); - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.A, 1)); - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.B, 1)); - - - - - nint - - - _Anonymous_e__Union - - - - _A_e__Struct - - - _B_e__Struct - - - - nint - - - - - nint - - - - - - - nint - - - nint - - - ref nint - - int - - - return ref AsSpan()[index]; - - - - Span<nint> - MemoryMarshal.CreateSpan(ref e0, 2); - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/VarDeclarationTest.cs deleted file mode 100644 index 26aa0acf..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultUnix/VarDeclarationTest.cs +++ /dev/null @@ -1,533 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlDefaultUnix_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@" - - - - - Guid - - new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) - - - - - -"; - - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - {expectedManagedValue} - - - - {expectedManagedType} - - {expectedManagedValue} - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@" - - - - - int - - 0 + 1 - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - uint[] - - new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }} - - - - uint[] - - new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }} - - - - uint[] - - new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }} - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - byte[] - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - uint[] - - new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }} - - - - uint[] - - new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }} - - - - uint[] - - new uint[] {{ 0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000 }} - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - byte[] - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@" - - - - - nint - - - - (nint)(0x80000000) - - - - - - int - - - - (int)(0x80000000) - - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@" - - - - - uint - - - - (uint)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(((nuint)(1) << 31) | ((nuint)(2) << 16) | ((nuint)(3)))) - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@" - - - - - int* - - - ((int*)(-1)) - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@" - - - - - int* - - - - (int*)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@" - - - - - int[][] - - new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }} - - - - - -"; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) - - - - - - -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedXmlDefaultUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/CXXMethodDeclarationTest.cs deleted file mode 100644 index 68d12ca2..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,1102 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlDefaultWindows_CXXMethodDeclarationTest : CXXMethodDeclarationXmlTest -{ - protected override Task ConstructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - int _value; - - MyStruct(int value) - { - _value = value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - void - - int - - _value = value; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(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 ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - - var entryPoint = Environment.Is64BitProcess ? "?DoWork@?$MyTemplate@H@@QEAAPEAHPEAH@Z" : "?DoWork@?$MyTemplate@H@@QEAPEHPEH@Z"; - - var expectedOutputContents = $@" - - - - - int* - - MyStruct* - - - int* - - null - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = Environment.Is64BitProcess - ? "?MyVoidMethod@MyStruct@@QEAAXXZ" - : "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - MyStruct* - - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(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 ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - int MyFunction() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(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 ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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> - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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> - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedXmlDefaultWindowsBindingsAsync(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 ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@" - - - - - void - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(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 ValidateGeneratedXmlDefaultWindowsBindingsAsync(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 ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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)); - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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)); - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/DeprecatedToObsoleteTest.cs deleted file mode 100644 index 0a45b2d1..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,537 +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; - -[Platform("win")] -public sealed class XmlDefaultWindows_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - Obsolete - int - - int - - - - Obsolete(""This is obsolete."") - int - - int - - - - int - - int - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@" - - - - - int - - 0 - - - - Obsolete - int - - 0 - - - - Obsolete(""This is obsolete."") - int - - 0 - - - - int - - 0 - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - Obsolete - void - - - - Obsolete(""This is obsolete."") - void - - - - void - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@" - - - - - int - return 0; - - - Obsolete - int - return 0; - - - Obsolete(""This is obsolete."") - int - return 0; - - - int - return 0; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - - Obsolete - delegate* unmanaged[Cdecl]<void> - - - - - Obsolete(""This is obsolete."") - delegate* unmanaged[Cdecl]<void> - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @" - - - - - void - - - Obsolete - void - - - Obsolete(""This is obsolete."") - void - - - void - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/EnumDeclarationTest.cs deleted file mode 100644 index 685f8e36..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/EnumDeclarationTest.cs +++ /dev/null @@ -1,730 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlDefaultWindows_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum : int -{ - MyEnum_Value1, - MyEnum_Value2, - MyEnum_Value3, -} MyEnum; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - var remappedNames = new Dictionary { ["_MyEnum"] = "MyEnum" }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @" - - - - Flags - int - - int - - 1 - - - - - int - - int - - 1 - - - - - -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - (int)(MyEnum)(10) - - - - int - - (int)(MyEnum)(MyEnum_Value0) - - - - int - - ((int)(MyEnum)(10)) + MyEnum_Value1 - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 10 - - - - - int - - int - - MyEnum1_Value0 - - - - int - - MyEnum1_Value0 + (int)(MyEnum1)(10) - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - int - - 0x80000000 - - - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - - - -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - 0x80000000 - - - - - -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - MyEnum1_Value1 - - - - - - int - - 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 ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @" - - - - - int - - 1 - - - - int - - (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 ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index 00348ce7..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,1992 +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; - -[Platform("win")] -public sealed class XmlDefaultWindows_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - - int - - return pData[index]; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - bool - - - bool - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - while (true) - {{ - break; - }} - - return 0; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = $@" - - - - - void - - - - void - MyCalledFunction(); - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = $@" - - - - - void - - int - - - int - - - - - void - MyCalledFunction(0, 1); - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 1: - case 2: - {{ - return 3; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 2: - case 3: - {{ - return 5; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = $@" - - - - int - - int - - - int - - - int - - - - - int - - MyEnum - - return (x == MyEnum_Value0 || x == MyEnum_Value1 || x == MyEnum_Value2) ? 1 : 0; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = $@" - - - - - int - - bool - - - int - - - int - - return condition ? lhs : rhs; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - while (true) - { - continue; - } - - return 0; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - void* - - void* - - return input; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@" - - - - - 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); - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @" - - - - - int - int x = 0; - int y = 1, z = 2; - - return x + y + z; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - - return rhs; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - - bool - - - int - - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - int - - MyStruct - - return instance.value; - - - int - - MyStruct* - - return instance->value; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - bool - - MyStruct* - - - MyStruct* - - return lhs->value == rhs->value; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @" - - - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - return {value}; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - double - return {value}; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - float - return {value}; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @" - - - - - void - return; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @" - - - - - int - return -1; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @" - - - - - _Anonymous_e__Struct - - - ref int - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - - - - - int - - - - - - void - MyUnion myUnion = new MyUnion(); - - myUnion.Anonymous.a = 10; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - - - MyStruct - MyStruct myStruct = new MyStruct(); - - return myStruct; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @" - - - - - int* - - int - - return &value; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - return *value; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @" - - - - - bool - - bool - - return !value; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return value{opcode}; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return {opcode}value; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index 39c1c6fa..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,464 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlDefaultWindows_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @" - - - - - void - - float* - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @" - - - - - void - - delegate* unmanaged[Cdecl]<void> - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@" - - - - - void - - MyTemplate<{expectedManagedType}> - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@" - - - - - MyTemplate<IntPtr> - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @" - - - - - void - - float - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() => Task.CompletedTask; - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionPointerDeclarationTest.cs deleted file mode 100644 index 373f3da5..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,82 +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; - -[Platform("win")] -public sealed class XmlDefaultWindows_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Stdcall]<void> - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/StructDeclarationTest.cs deleted file mode 100644 index 6873e848..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/StructDeclarationTest.cs +++ /dev/null @@ -1,1977 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlDefaultWindows_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - - void - - - - -"; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - - MyStruct - - - MyStruct - - - MyStruct - - - ref MyStruct - - int - - - return ref AsSpan()[index]; - - - - Span<MyStruct> - MemoryMarshal.CreateSpan(ref e0, 3); - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - 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 - - - return ref AsSpan()[index]; - - - - Span<MyStruct> - MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - - MyStruct - - - MyStruct - - - MyStruct - - - ref MyStruct - - int - - - return ref AsSpan()[index]; - - - - Span<MyStruct> - MemoryMarshal.CreateSpan(ref e0, 3); - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - - MyStruct - - - MyStruct - - - MyStruct - - - ref MyStruct - - int - - - return ref AsSpan()[index]; - - - - Span<MyStruct> - MemoryMarshal.CreateSpan(ref e0, 3); - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Struct - - - ref {expectedManagedType} - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); - - - - ref _Anonymous_e__Struct._w_e__Struct - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.w, 1)); - - - - ref MyUnion - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.u, 1)); - - - - Span<{expectedManagedType}> - - return MemoryMarshal.CreateSpan(ref Anonymous.buffer1[0], 4); - - - - Span<MyUnion> - - return Anonymous.buffer2.AsSpan(); - - - - - {expectedManagedType} - - - _w_e__Struct - - - MyUnion - - - {expectedManagedType} - - - MyUnion - - - - {expectedManagedType} - - - - - MyUnion - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - return ref AsSpan()[index]; - - - - Span<MyUnion> - MemoryMarshal.CreateSpan(ref e0, 4); - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Struct - - - ref int - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); - - - - ref int - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_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); - - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var packing = Environment.Is64BitProcess ? " layout=\"Sequential\" pack=\"4\"" : string.Empty; - - var expectedOutputContents = $@" - - - - - uint - - - void* - - - uint - - - - - uint - - - void* - - - uint - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Struct - - - ref double - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - - void - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - int - - - int - - - - -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @" - - - - - nuint - - - - nuint - - - nuint - - - ref nuint - - int - - - return ref AsSpan()[index]; - - - - Span<nuint> - MemoryMarshal.CreateSpan(ref e0, 2); - - - - - -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @" - - - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/UnionDeclarationTest.cs deleted file mode 100644 index 74231b71..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/UnionDeclarationTest.cs +++ /dev/null @@ -1,1422 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlDefaultWindows_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @" pack=""1""" : ""; - - var expectedOutputContents = $@" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - return ref AsSpan()[index]; - - - - Span<MyUnion> - MemoryMarshal.CreateSpan(ref e0, 3); - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - 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 - - - return ref AsSpan()[index]; - - - - Span<MyUnion> - MemoryMarshal.CreateSpan(ref e0_0_0_0, 24); - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - return ref AsSpan()[index]; - - - - Span<MyUnion> - MemoryMarshal.CreateSpan(ref e0, 3); - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - - MyUnion - - - MyUnion - - - MyUnion - - - ref MyUnion - - int - - - return ref AsSpan()[index]; - - - - Span<MyUnion> - MemoryMarshal.CreateSpan(ref e0, 3); - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Union - - - ref {expectedManagedType} - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - - - - ref MyStruct - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.s, 1)); - - - - Span<{expectedManagedType}> - - return MemoryMarshal.CreateSpan(ref Anonymous.buffer[0], 4); - - - - - {expectedManagedType} - - - MyStruct - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Union - - - ref int - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.z, 1)); - - - - ref int - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.w, 1)); - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_e__Union - - - - int - - - int - - - int - - return (_bitfield << 16) >> 16; - - - - _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF); - - - - int - - return (_bitfield << 12) >> 28; - - - - _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16); - - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Union - - - ref double - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.a, 1)); - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@" - - - - - int - - - _Anonymous_e__Struct - - - ref int - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.First, 1)); - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.A, 1)); - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct - - return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Anonymous.B, 1)); - - - - - int - - - _Anonymous_e__Union - - - - _A_e__Struct - - - _B_e__Struct - - - - int - - - - - int - - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/VarDeclarationTest.cs deleted file mode 100644 index 32a1e7f7..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlDefaultWindows/VarDeclarationTest.cs +++ /dev/null @@ -1,533 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlDefaultWindows_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@" - - - - - Guid - - new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) - - - - - -"; - - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - {expectedManagedValue} - - - - {expectedManagedType} - - {expectedManagedValue} - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@" - - - - - int - - 0 + 1 - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - byte[] - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - byte[] - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - ReadOnlySpan<byte> - - new byte[] {{ 0x54, 0x65, 0x73, 0x74, 0x00, 0x5C, 0x0D, 0x0A, 0x09, 0x22, 0x00 }} - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@" - - - - - int - - - - (int)(0x80000000) - - - - - - int - - - - (int)(0x80000000) - - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@" - - - - - uint - - - - (uint)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))) - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@" - - - - - int* - - - ((int*)(-1)) - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@" - - - - - int* - - - - (int*)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@" - - - - - int[][] - - new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }} - - - - - -"; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) - - - - - - -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedXmlDefaultWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/CXXMethodDeclarationTest.cs deleted file mode 100644 index 6f9e9e76..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,1102 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlLatestUnix_CXXMethodDeclarationTest : CXXMethodDeclarationXmlTest -{ - protected override Task ConstructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - int _value; - - MyStruct(int value) - { - _value = value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - void - - int - - _value = value; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(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 ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8$MyTemplateDoWorkEv" : "_ZN10MyTemplateIiE6DoWorkEPi"; - - var expectedOutputContents = $@" - - - - - int* - - MyStruct* - - - int* - - null - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = Environment.Is64BitProcess - ? "?MyVoidMethod@MyStruct@@QEAAXXZ" - : "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - MyStruct* - - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(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 ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - int MyFunction() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(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 ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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> - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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> - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedXmlLatestUnixBindingsAsync(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 ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@" - - - - - void - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(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 ValidateGeneratedXmlLatestUnixBindingsAsync(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 ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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)); - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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)); - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/DeprecatedToObsoleteTest.cs deleted file mode 100644 index 36d7c219..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,537 +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; - -[Platform("unix")] -public sealed class XmlLatestUnix_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - Obsolete - int - - int - - - - Obsolete(""This is obsolete."") - int - - int - - - - int - - int - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@" - - - - - int - - 0 - - - - Obsolete - int - - 0 - - - - Obsolete(""This is obsolete."") - int - - 0 - - - - int - - 0 - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - Obsolete - void - - - - Obsolete(""This is obsolete."") - void - - - - void - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@" - - - - - int - return 0; - - - Obsolete - int - return 0; - - - Obsolete(""This is obsolete."") - int - return 0; - - - int - return 0; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - - Obsolete - delegate* unmanaged[Cdecl]<void> - - - - - Obsolete(""This is obsolete."") - delegate* unmanaged[Cdecl]<void> - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @" - - - - - void - - - Obsolete - void - - - Obsolete(""This is obsolete."") - void - - - void - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/EnumDeclarationTest.cs deleted file mode 100644 index 6161c739..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/EnumDeclarationTest.cs +++ /dev/null @@ -1,730 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlLatestUnix_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum : int -{ - MyEnum_Value1, - MyEnum_Value2, - MyEnum_Value3, -} MyEnum; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - var remappedNames = new Dictionary { ["_MyEnum"] = "MyEnum" }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @" - - - - Flags - int - - int - - 1 - - - - - int - - int - - 1 - - - - - -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - (int)(MyEnum)(10) - - - - int - - (int)(MyEnum)(MyEnum_Value0) - - - - int - - ((int)(MyEnum)(10)) + MyEnum_Value1 - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 10 - - - - - int - - int - - MyEnum1_Value0 - - - - int - - MyEnum1_Value0 + (int)(MyEnum1)(10) - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - int - - 0x80000000 - - - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - - - -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - 0x80000000 - - - - - -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - MyEnum1_Value1 - - - - - - uint - - 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 ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @" - - - - - uint - - 1 - - - - int - - (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 ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index 861c27f3..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,1992 +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; - -[Platform("unix")] -public sealed class XmlLatestUnix_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - - int - - return pData[index]; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - bool - - - bool - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - while (true) - {{ - break; - }} - - return 0; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = $@" - - - - - void - - - - void - MyCalledFunction(); - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = $@" - - - - - void - - int - - - int - - - - - void - MyCalledFunction(0, 1); - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 1: - case 2: - {{ - return 3; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 2: - case 3: - {{ - return 5; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = $@" - - - - int - - int - - - int - - - int - - - - - int - - MyEnum - - return (x == MyEnum_Value0 || x == MyEnum_Value1 || x == MyEnum_Value2) ? 1 : 0; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = $@" - - - - - int - - bool - - - int - - - int - - return condition ? lhs : rhs; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - while (true) - { - continue; - } - - return 0; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - void* - - void* - - return input; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@" - - - - - 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); - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @" - - - - - int - int x = 0; - int y = 1, z = 2; - - return x + y + z; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - - return rhs; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - - bool - - - int - - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - int - - MyStruct - - return instance.value; - - - int - - MyStruct* - - return instance->value; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - bool - - MyStruct* - - - MyStruct* - - return lhs->value == rhs->value; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @" - - - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - return {value}; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - double - return {value}; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - float - return {value}; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @" - - - - - void - return; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @" - - - - - int - return -1; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @" - - - - - _Anonymous_e__Struct - - - ref int - - return ref Anonymous.a; - - - - - int - - - - - - void - MyUnion myUnion = new MyUnion(); - - myUnion.Anonymous.a = 10; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - - - MyStruct - MyStruct myStruct = new MyStruct(); - - return myStruct; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @" - - - - - int* - - int - - return &value; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - return *value; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @" - - - - - bool - - bool - - return !value; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return value{opcode}; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return {opcode}value; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index d3222b5d..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,464 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlLatestUnix_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @" - - - - - void - - float* - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @" - - - - - void - - delegate* unmanaged[Cdecl]<void> - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@" - - - - - void - - MyTemplate<{expectedManagedType}> - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@" - - - - - MyTemplate<IntPtr> - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @" - - - - - void - - float - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() => Task.CompletedTask; - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionPointerDeclarationTest.cs deleted file mode 100644 index 6c03dc0c..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,82 +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; - -[Platform("unix")] -public sealed class XmlLatestUnix_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Stdcall]<void> - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/StructDeclarationTest.cs deleted file mode 100644 index c195d55d..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/StructDeclarationTest.cs +++ /dev/null @@ -1,1841 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlLatestUnix_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - return ref Unsafe.Add(ref e0, index); - - - - Span<{expectedManagedType}> - - int - - MemoryMarshal.CreateSpan(ref e0, length); - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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(""o4_b22_1"", offset: 22, length: 1) - NativeBitfield(""o4_b23_1"", offset: 23, length: 1) - NativeBitfield(""o4_b24_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); - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - - void - - - - -"; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(3) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(2 * 1 * 3 * 4) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(3) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(3) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(2 * 1 * 3 * 4) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Unix doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Struct - - - ref {expectedManagedType} - - return ref Anonymous.z; - - - - ref _Anonymous_e__Struct._w_e__Struct - - return ref Anonymous.w; - - - - ref MyUnion - - return ref Anonymous.u; - - - - Span<{expectedManagedType}> - - return Anonymous.buffer1; - - - - Span<MyUnion> - - return Anonymous.buffer2; - - - - - {expectedManagedType} - - - _w_e__Struct - - - MyUnion - - - {expectedManagedType} - - - MyUnion - - - - {expectedManagedType} - - - - InlineArray(4) - - {expectedManagedType} - - - - InlineArray(4) - - MyUnion - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Struct - - - ref int - - return ref Anonymous.z; - - - - ref int - - return ref Anonymous.Anonymous.w; - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_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); - - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var packing = Environment.Is64BitProcess ? " layout=\"Sequential\" pack=\"4\"" : string.Empty; - - var expectedOutputContents = $@" - - - - - uint - - - void* - - - uint - - - - - uint - - - void* - - - uint - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Struct - - - ref double - - return ref Anonymous.a; - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - - void - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - int - - - int - - - - -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"typedef int size_t; - -struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @" - - - - - nuint - - - InlineArray(2) - - nuint - - - - - -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @" - - - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/UnionDeclarationTest.cs deleted file mode 100644 index d989592e..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/UnionDeclarationTest.cs +++ /dev/null @@ -1,1311 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlLatestUnix_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @" pack=""1""" : ""; - - var expectedOutputContents = $@" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(3) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(2 * 1 * 3 * 4) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(3) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(3) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(2 * 1 * 3 * 4) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Unix doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Union - - - ref {expectedManagedType} - - return ref Anonymous.a; - - - - ref MyStruct - - return ref Anonymous.s; - - - - Span<{expectedManagedType}> - - return Anonymous.buffer; - - - - - {expectedManagedType} - - - MyStruct - - - {expectedManagedType} - - - InlineArray(4) - - {expectedManagedType} - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Union - - - ref int - - return ref Anonymous.z; - - - - ref int - - return ref Anonymous.Anonymous.w; - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_e__Union - - - - int - - - int - - - int - - return (_bitfield << 16) >> 16; - - - - _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF); - - - - int - - return (_bitfield << 12) >> 28; - - - - _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16); - - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Union - - - ref double - - return ref Anonymous.a; - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@" - - - - - nint - - - _Anonymous_e__Struct - - - ref nint - - return ref Anonymous.First; - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct - - return ref Anonymous.Anonymous.A; - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct - - return ref Anonymous.Anonymous.B; - - - - - nint - - - _Anonymous_e__Union - - - - _A_e__Struct - - - _B_e__Struct - - - - nint - - - - - nint - - - - - - InlineArray(2) - - nint - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/VarDeclarationTest.cs deleted file mode 100644 index 7092a765..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestUnix/VarDeclarationTest.cs +++ /dev/null @@ -1,533 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlLatestUnix_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@" - - - - - Guid - - new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) - - - - - -"; - - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - {expectedManagedValue} - - - - {expectedManagedType} - - {expectedManagedValue} - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@" - - - - - int - - 0 + 1 - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<uint> - - [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000] - - - - uint[] - - [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000] - - - - ReadOnlySpan<uint> - - [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000] - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - byte[] - - ""Test\0\\\r\n\t\""""u8.ToArray() - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<uint> - - [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000] - - - - uint[] - - [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000] - - - - ReadOnlySpan<uint> - - [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000] - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - byte[] - - ""Test\0\\\r\n\t\""""u8.ToArray() - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@" - - - - - nint - - - - (nint)(0x80000000) - - - - - - int - - - - (int)(0x80000000) - - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@" - - - - - uint - - - - (uint)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(((nuint)(1) << 31) | ((nuint)(2) << 16) | ((nuint)(3)))) - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@" - - - - - int* - - - ((int*)(-1)) - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@" - - - - - int* - - - - (int*)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@" - - - - - int[][] - - new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }} - - - - - -"; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) - - - - - - -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/CXXMethodDeclarationTest.cs deleted file mode 100644 index 56aa6a01..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,1102 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlLatestWindows_CXXMethodDeclarationTest : CXXMethodDeclarationXmlTest -{ - protected override Task ConstructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - int _value; - - MyStruct(int value) - { - _value = value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - void - - int - - _value = value; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(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 ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - - var entryPoint = Environment.Is64BitProcess ? "?DoWork@?$MyTemplate@H@@QEAAPEAHPEAH@Z" : "?DoWork@?$MyTemplate@H@@QEAPEHPEH@Z"; - - var expectedOutputContents = $@" - - - - - int* - - MyStruct* - - - int* - - null - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = Environment.Is64BitProcess - ? "?MyVoidMethod@MyStruct@@QEAAXXZ" - : "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - MyStruct* - - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(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 ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - int MyFunction() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(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 ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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> - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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> - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedXmlLatestWindowsBindingsAsync(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 ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@" - - - - - void - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(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 ValidateGeneratedXmlLatestWindowsBindingsAsync(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 ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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)); - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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)); - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/DeprecatedToObsoleteTest.cs deleted file mode 100644 index f6de9033..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,537 +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; - -[Platform("win")] -public sealed class XmlLatestWindows_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - Obsolete - int - - int - - - - Obsolete(""This is obsolete."") - int - - int - - - - int - - int - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@" - - - - - int - - 0 - - - - Obsolete - int - - 0 - - - - Obsolete(""This is obsolete."") - int - - 0 - - - - int - - 0 - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - Obsolete - void - - - - Obsolete(""This is obsolete."") - void - - - - void - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@" - - - - - int - return 0; - - - Obsolete - int - return 0; - - - Obsolete(""This is obsolete."") - int - return 0; - - - int - return 0; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - - Obsolete - delegate* unmanaged[Cdecl]<void> - - - - - Obsolete(""This is obsolete."") - delegate* unmanaged[Cdecl]<void> - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @" - - - - - void - - - Obsolete - void - - - Obsolete(""This is obsolete."") - void - - - void - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/EnumDeclarationTest.cs deleted file mode 100644 index cb6bf487..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/EnumDeclarationTest.cs +++ /dev/null @@ -1,730 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlLatestWindows_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum : int -{ - MyEnum_Value1, - MyEnum_Value2, - MyEnum_Value3, -} MyEnum; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - var remappedNames = new Dictionary { ["_MyEnum"] = "MyEnum" }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @" - - - - Flags - int - - int - - 1 - - - - - int - - int - - 1 - - - - - -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - (int)(MyEnum)(10) - - - - int - - (int)(MyEnum)(MyEnum_Value0) - - - - int - - ((int)(MyEnum)(10)) + MyEnum_Value1 - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 10 - - - - - int - - int - - MyEnum1_Value0 - - - - int - - MyEnum1_Value0 + (int)(MyEnum1)(10) - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - int - - 0x80000000 - - - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - - - -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - 0x80000000 - - - - - -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - MyEnum1_Value1 - - - - - - int - - 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 ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @" - - - - - int - - 1 - - - - int - - (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 ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index bdca15de..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,1992 +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; - -[Platform("win")] -public sealed class XmlLatestWindows_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - - int - - return pData[index]; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - bool - - - bool - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - while (true) - {{ - break; - }} - - return 0; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = $@" - - - - - void - - - - void - MyCalledFunction(); - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = $@" - - - - - void - - int - - - int - - - - - void - MyCalledFunction(0, 1); - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 1: - case 2: - {{ - return 3; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 2: - case 3: - {{ - return 5; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = $@" - - - - int - - int - - - int - - - int - - - - - int - - MyEnum - - return (x == MyEnum_Value0 || x == MyEnum_Value1 || x == MyEnum_Value2) ? 1 : 0; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = $@" - - - - - int - - bool - - - int - - - int - - return condition ? lhs : rhs; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - while (true) - { - continue; - } - - return 0; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - void* - - void* - - return input; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@" - - - - - 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); - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @" - - - - - int - int x = 0; - int y = 1, z = 2; - - return x + y + z; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - - return rhs; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - - bool - - - int - - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - int - - MyStruct - - return instance.value; - - - int - - MyStruct* - - return instance->value; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - bool - - MyStruct* - - - MyStruct* - - return lhs->value == rhs->value; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @" - - - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - return {value}; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - double - return {value}; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - float - return {value}; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @" - - - - - void - return; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @" - - - - - int - return -1; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @" - - - - - _Anonymous_e__Struct - - - ref int - - return ref Anonymous.a; - - - - - int - - - - - - void - MyUnion myUnion = new MyUnion(); - - myUnion.Anonymous.a = 10; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - - - MyStruct - MyStruct myStruct = new MyStruct(); - - return myStruct; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @" - - - - - int* - - int - - return &value; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - return *value; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @" - - - - - bool - - bool - - return !value; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return value{opcode}; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return {opcode}value; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index 83365118..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,464 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlLatestWindows_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @" - - - - - void - - float* - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @" - - - - - void - - delegate* unmanaged[Cdecl]<void> - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@" - - - - - void - - MyTemplate<{expectedManagedType}> - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@" - - - - - MyTemplate<IntPtr> - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @" - - - - - void - - float - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() => Task.CompletedTask; - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionPointerDeclarationTest.cs deleted file mode 100644 index 68f182af..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,82 +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; - -[Platform("win")] -public sealed class XmlLatestWindows_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Stdcall]<void> - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/StructDeclarationTest.cs deleted file mode 100644 index 173ae57e..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/StructDeclarationTest.cs +++ /dev/null @@ -1,1851 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlLatestWindows_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - return ref Unsafe.Add(ref e0, index); - - - - Span<{expectedManagedType}> - - int - - MemoryMarshal.CreateSpan(ref e0, length); - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - - void - - - - -"; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(3) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(2 * 1 * 3 * 4) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(3) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(3) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(2 * 1 * 3 * 4) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Struct - - - ref {expectedManagedType} - - return ref Anonymous.z; - - - - ref _Anonymous_e__Struct._w_e__Struct - - return ref Anonymous.w; - - - - ref MyUnion - - return ref Anonymous.u; - - - - Span<{expectedManagedType}> - - return Anonymous.buffer1; - - - - Span<MyUnion> - - return Anonymous.buffer2; - - - - - {expectedManagedType} - - - _w_e__Struct - - - MyUnion - - - {expectedManagedType} - - - MyUnion - - - - {expectedManagedType} - - - - InlineArray(4) - - {expectedManagedType} - - - - InlineArray(4) - - MyUnion - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Struct - - - ref int - - return ref Anonymous.z; - - - - ref int - - return ref Anonymous.Anonymous.w; - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_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); - - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var packing = Environment.Is64BitProcess ? " layout=\"Sequential\" pack=\"4\"" : string.Empty; - - var expectedOutputContents = $@" - - - - - uint - - - void* - - - uint - - - - - uint - - - void* - - - uint - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Struct - - - ref double - - return ref Anonymous.a; - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - - void - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - int - - - int - - - - -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @" - - - - - nuint - - - InlineArray(2) - - nuint - - - - - -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @" - - - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/UnionDeclarationTest.cs deleted file mode 100644 index 1fda6ad0..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/UnionDeclarationTest.cs +++ /dev/null @@ -1,1317 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlLatestWindows_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @" pack=""1""" : ""; - - var expectedOutputContents = $@" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(3) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(2 * 1 * 3 * 4) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(3) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(3) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(2 * 1 * 3 * 4) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Union - - - ref {expectedManagedType} - - return ref Anonymous.a; - - - - ref MyStruct - - return ref Anonymous.s; - - - - Span<{expectedManagedType}> - - return Anonymous.buffer; - - - - - {expectedManagedType} - - - MyStruct - - - {expectedManagedType} - - - InlineArray(4) - - {expectedManagedType} - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Union - - - ref int - - return ref Anonymous.z; - - - - ref int - - return ref Anonymous.Anonymous.w; - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_e__Union - - - - int - - - int - - - int - - return (_bitfield << 16) >> 16; - - - - _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF); - - - - int - - return (_bitfield << 12) >> 28; - - - - _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16); - - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Union - - - ref double - - return ref Anonymous.a; - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@" - - - - - int - - - _Anonymous_e__Struct - - - ref int - - return ref Anonymous.First; - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct - - return ref Anonymous.Anonymous.A; - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct - - return ref Anonymous.Anonymous.B; - - - - - int - - - _Anonymous_e__Union - - - - _A_e__Struct - - - _B_e__Struct - - - - int - - - - - int - - - - - - InlineArray(2) - - int - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/VarDeclarationTest.cs deleted file mode 100644 index 1c1ae4dc..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlLatestWindows/VarDeclarationTest.cs +++ /dev/null @@ -1,534 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlLatestWindows_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@" - - - - - Guid - - new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) - - - - - -"; - - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - {expectedManagedValue} - - - - {expectedManagedType} - - {expectedManagedValue} - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@" - - - - - int - - 0 + 1 - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - byte[] - - ""Test\0\\\r\n\t\""""u8.ToArray() - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - byte[] - - ""Test\0\\\r\n\t\""""u8.ToArray() - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@" - - - - - int - - - - (int)(0x80000000) - - - - - - int - - - - (int)(0x80000000) - - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@" - - - - - uint - - - - (uint)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))) - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@" - - - - - int* - - - ((int*)(-1)) - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@" - - - - - int* - - - - (int*)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@" - - - - - int[][] - - new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }} - - - - - -"; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) - - - - - - -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/CXXMethodDeclarationTest.cs deleted file mode 100644 index 6f753d62..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,1100 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlPreviewUnix_CXXMethodDeclarationTest : CXXMethodDeclarationXmlTest -{ - protected override Task ConstructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - int _value; - - MyStruct(int value) - { - _value = value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - void - - int - - _value = value; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(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 ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8$MyTemplateDoWorkEv" : "_ZN10MyTemplateIiE6DoWorkEPi"; - var expectedOutputContents = $@" - - - - - int* - - MyStruct* - - - int* - - null - - - - - - -"; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = Environment.Is64BitProcess - ? "?MyVoidMethod@MyStruct@@QEAAXXZ" - : "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - MyStruct* - - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(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 ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - int MyFunction() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(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 ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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> - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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> - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedXmlPreviewUnixBindingsAsync(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 ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@" - - - - - void - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(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 ValidateGeneratedXmlPreviewUnixBindingsAsync(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 ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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)); - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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)); - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/DeprecatedToObsoleteTest.cs deleted file mode 100644 index 4a33ede7..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,537 +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; - -[Platform("unix")] -public sealed class XmlPreviewUnix_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - Obsolete - int - - int - - - - Obsolete(""This is obsolete."") - int - - int - - - - int - - int - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@" - - - - - int - - 0 - - - - Obsolete - int - - 0 - - - - Obsolete(""This is obsolete."") - int - - 0 - - - - int - - 0 - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - Obsolete - void - - - - Obsolete(""This is obsolete."") - void - - - - void - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@" - - - - - int - return 0; - - - Obsolete - int - return 0; - - - Obsolete(""This is obsolete."") - int - return 0; - - - int - return 0; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - - Obsolete - delegate* unmanaged[Cdecl]<void> - - - - - Obsolete(""This is obsolete."") - delegate* unmanaged[Cdecl]<void> - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @" - - - - - void - - - Obsolete - void - - - Obsolete(""This is obsolete."") - void - - - void - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/EnumDeclarationTest.cs deleted file mode 100644 index cb00d940..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/EnumDeclarationTest.cs +++ /dev/null @@ -1,730 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlPreviewUnix_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum : int -{ - MyEnum_Value1, - MyEnum_Value2, - MyEnum_Value3, -} MyEnum; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - var remappedNames = new Dictionary { ["_MyEnum"] = "MyEnum" }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @" - - - - Flags - int - - int - - 1 - - - - - int - - int - - 1 - - - - - -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - (int)(MyEnum)(10) - - - - int - - (int)(MyEnum)(MyEnum_Value0) - - - - int - - ((int)(MyEnum)(10)) + MyEnum_Value1 - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 10 - - - - - int - - int - - MyEnum1_Value0 - - - - int - - MyEnum1_Value0 + (int)(MyEnum1)(10) - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - int - - 0x80000000 - - - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - - - -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - 0x80000000 - - - - - -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - MyEnum1_Value1 - - - - - - uint - - 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 ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @" - - - - - uint - - 1 - - - - int - - (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 ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index 790a437c..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,1992 +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; - -[Platform("unix")] -public sealed class XmlPreviewUnix_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - - int - - return pData[index]; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - bool - - - bool - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - while (true) - {{ - break; - }} - - return 0; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = $@" - - - - - void - - - - void - MyCalledFunction(); - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = $@" - - - - - void - - int - - - int - - - - - void - MyCalledFunction(0, 1); - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 1: - case 2: - {{ - return 3; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 2: - case 3: - {{ - return 5; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = $@" - - - - int - - int - - - int - - - int - - - - - int - - MyEnum - - return (x == MyEnum_Value0 || x == MyEnum_Value1 || x == MyEnum_Value2) ? 1 : 0; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = $@" - - - - - int - - bool - - - int - - - int - - return condition ? lhs : rhs; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - while (true) - { - continue; - } - - return 0; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - void* - - void* - - return input; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@" - - - - - 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); - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @" - - - - - int - int x = 0; - int y = 1, z = 2; - - return x + y + z; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - - return rhs; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - - bool - - - int - - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - int - - MyStruct - - return instance.value; - - - int - - MyStruct* - - return instance->value; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - bool - - MyStruct* - - - MyStruct* - - return lhs->value == rhs->value; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @" - - - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - return {value}; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - double - return {value}; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - float - return {value}; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @" - - - - - void - return; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @" - - - - - int - return -1; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @" - - - - - _Anonymous_e__Struct - - - ref int - - return ref Anonymous.a; - - - - - int - - - - - - void - MyUnion myUnion = new MyUnion(); - - myUnion.Anonymous.a = 10; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - - - MyStruct - MyStruct myStruct = new MyStruct(); - - return myStruct; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @" - - - - - int* - - int - - return &value; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - return *value; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @" - - - - - bool - - bool - - return !value; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return value{opcode}; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return {opcode}value; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index 7816a51b..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,464 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlPreviewUnix_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @" - - - - - void - - float* - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @" - - - - - void - - delegate* unmanaged[Cdecl]<void> - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@" - - - - - void - - MyTemplate<{expectedManagedType}> - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@" - - - - - MyTemplate<IntPtr> - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @" - - - - - void - - float - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() => Task.CompletedTask; - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionPointerDeclarationTest.cs deleted file mode 100644 index 5ccea7ec..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,82 +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; - -[Platform("unix")] -public sealed class XmlPreviewUnix_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Stdcall]<void> - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/StructDeclarationTest.cs deleted file mode 100644 index d11a6c97..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/StructDeclarationTest.cs +++ /dev/null @@ -1,1841 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlPreviewUnix_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - return ref Unsafe.Add(ref e0, index); - - - - Span<{expectedManagedType}> - - int - - MemoryMarshal.CreateSpan(ref e0, length); - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o4_b22_1 : 1; - int o4_b23_1 : 1; - int o4_b24_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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(""o4_b22_1"", offset: 22, length: 1) - NativeBitfield(""o4_b23_1"", offset: 23, length: 1) - NativeBitfield(""o4_b24_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); - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - - void - - - - -"; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(3) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(2 * 1 * 3 * 4) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(3) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(3) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(2 * 1 * 3 * 4) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Unix doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Struct - - - ref {expectedManagedType} - - return ref Anonymous.z; - - - - ref _Anonymous_e__Struct._w_e__Struct - - return ref Anonymous.w; - - - - ref MyUnion - - return ref Anonymous.u; - - - - Span<{expectedManagedType}> - - return Anonymous.buffer1; - - - - Span<MyUnion> - - return Anonymous.buffer2; - - - - - {expectedManagedType} - - - _w_e__Struct - - - MyUnion - - - {expectedManagedType} - - - MyUnion - - - - {expectedManagedType} - - - - InlineArray(4) - - {expectedManagedType} - - - - InlineArray(4) - - MyUnion - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Struct - - - ref int - - return ref Anonymous.z; - - - - ref int - - return ref Anonymous.Anonymous.w; - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_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); - - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var packing = Environment.Is64BitProcess ? " layout=\"Sequential\" pack=\"4\"" : string.Empty; - - var expectedOutputContents = $@" - - - - - uint - - - void* - - - uint - - - - - uint - - - void* - - - uint - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Struct - - - ref double - - return ref Anonymous.a; - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - - void - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - int - - - int - - - - -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"typedef int size_t; - -struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @" - - - - - nuint - - - InlineArray(2) - - nuint - - - - - -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @" - - - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/UnionDeclarationTest.cs deleted file mode 100644 index 18afdd60..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/UnionDeclarationTest.cs +++ /dev/null @@ -1,1311 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlPreviewUnix_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @" pack=""1""" : ""; - - var expectedOutputContents = $@" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(3) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(2 * 1 * 3 * 4) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(3) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(3) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(2 * 1 * 3 * 4) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Unix doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Union - - - ref {expectedManagedType} - - return ref Anonymous.a; - - - - ref MyStruct - - return ref Anonymous.s; - - - - Span<{expectedManagedType}> - - return Anonymous.buffer; - - - - - {expectedManagedType} - - - MyStruct - - - {expectedManagedType} - - - InlineArray(4) - - {expectedManagedType} - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Union - - - ref int - - return ref Anonymous.z; - - - - ref int - - return ref Anonymous.Anonymous.w; - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_e__Union - - - - int - - - int - - - int - - return (_bitfield << 16) >> 16; - - - - _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF); - - - - int - - return (_bitfield << 12) >> 28; - - - - _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16); - - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Union - - - ref double - - return ref Anonymous.a; - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@" - - - - - nint - - - _Anonymous_e__Struct - - - ref nint - - return ref Anonymous.First; - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct - - return ref Anonymous.Anonymous.A; - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct - - return ref Anonymous.Anonymous.B; - - - - - nint - - - _Anonymous_e__Union - - - - _A_e__Struct - - - _B_e__Struct - - - - nint - - - - - nint - - - - - - InlineArray(2) - - nint - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/VarDeclarationTest.cs deleted file mode 100644 index 84b87012..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewUnix/VarDeclarationTest.cs +++ /dev/null @@ -1,533 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("unix")] -public sealed class XmlPreviewUnix_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@" - - - - - Guid - - new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) - - - - - -"; - - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - {expectedManagedValue} - - - - {expectedManagedType} - - {expectedManagedValue} - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@" - - - - - int - - 0 + 1 - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<uint> - - [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000] - - - - uint[] - - [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000] - - - - ReadOnlySpan<uint> - - [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000] - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - byte[] - - ""Test\0\\\r\n\t\""""u8.ToArray() - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<uint> - - [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000] - - - - uint[] - - [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000] - - - - ReadOnlySpan<uint> - - [0x00000054, 0x00000065, 0x00000073, 0x00000074, 0x00000000, 0x0000005C, 0x0000000D, 0x0000000A, 0x00000009, 0x00000022, 0x00000000] - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - byte[] - - ""Test\0\\\r\n\t\""""u8.ToArray() - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@" - - - - - nint - - - - (nint)(0x80000000) - - - - - - int - - - - (int)(0x80000000) - - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@" - - - - - uint - - - - (uint)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(((nuint)(1) << 31) | ((nuint)(2) << 16) | ((nuint)(3)))) - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@" - - - - - int* - - - ((int*)(-1)) - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@" - - - - - int* - - - - (int*)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@" - - - - - int[][] - - new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }} - - - - - -"; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) - - - - - - -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/CXXMethodDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/CXXMethodDeclarationTest.cs deleted file mode 100644 index e942b31a..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/CXXMethodDeclarationTest.cs +++ /dev/null @@ -1,1101 +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; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlPreviewWindows_CXXMethodDeclarationTest : CXXMethodDeclarationXmlTest -{ - protected override Task ConstructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - int _value; - - MyStruct(int value) - { - _value = value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - void - - int - - _value = value; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(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 ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConversionTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - operator int() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DefaultParameterInheritedFromTemplateTestImpl() - { - // NOTE: This is a regression test where a struct inherits a function from a template with a default parameter. - const string InputContents = @"template -struct MyTemplate -{ - int* DoWork(int* value = nullptr) - { - return value; - } -}; - -struct MyStruct : public MyTemplate -{}; -"; - - var entryPoint = Environment.Is64BitProcess ? "?DoWork@?$MyTemplate@H@@QEAAPEAHPEAH@Z" : "?DoWork@?$MyTemplate@H@@QEAPEHPEH@Z"; - - var expectedOutputContents = $@" - - - - - int* - - MyStruct* - - - int* - - null - - - - - - -"; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task DestructorTestImpl() - { - var inputContents = @"struct MyStruct -{ - ~MyStruct() - { - } -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceTestImpl() - { - var inputContents = @"struct MyStruct -{ - void MyVoidMethod(); - - int MyInt32Method() - { - return 0; - } - - void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN8MyStruct12MyVoidMethodEv" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = Environment.Is64BitProcess - ? "?MyVoidMethod@MyStruct@@QEAAXXZ" - : "?MyVoidMethod@MyStruct@@QAEXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - MyStruct* - - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(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 ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; - - int MyFunction() - { - return value; - } -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - return value; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(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 ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var expectedOutputContents = $@" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordVirtualWithExplicitVtblTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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> - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls); - } - - protected override Task NewKeywordVirtualWithExplicitVtblAndMarkerInterfaceTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual int GetType(int obj) = 0; - virtual int GetType() = 0; - virtual int GetType(int objA, int objB) = 0; -};"; - - var nativeCallConv = ""; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Environment.Is64BitProcess) - { - nativeCallConv = " __attribute__((thiscall))"; - } - - var expectedOutputContents = $@" - - - - - 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> - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateExplicitVtbls | PInvokeGeneratorConfigurationOptions.GenerateMarkerInterfaces); - } - - 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 ValidateGeneratedXmlPreviewWindowsBindingsAsync(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 ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StaticTestImpl() - { - var inputContents = @"struct MyStruct -{ - static void MyVoidMethod(); - - static int MyInt32Method() - { - return 0; - } - - static void* MyVoidStarMethod() - { - return nullptr; - } -}; -"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "?MyVoidMethod@MyStruct@@SAXXZ" : "_ZN8MyStruct12MyVoidMethodEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - entryPoint = $"_{entryPoint}"; - } - - var expectedOutputContents = $@" - - - - - void - - - int - return 0; - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(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 ValidateGeneratedXmlPreviewWindowsBindingsAsync(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 ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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)); - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task VirtualWithVtblIndexAttributeTestImpl() - { - var inputContents = @"struct MyStruct -{ - virtual void MyVoidMethod() = 0; - - virtual char MyInt8Method() - { - return 0; - } - - virtual int MyInt32Method(); - - virtual void* MyVoidStarMethod() = 0; -}; -"; - - var expectedOutputContents = $@" - - - - - 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)); - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateVtblIndexAttribute); - } - - protected override Task ValidateBindingsAsync(string inputContents, string expectedOutputContents) => ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/DeprecatedToObsoleteTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/DeprecatedToObsoleteTest.cs deleted file mode 100644 index 7bc36051..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/DeprecatedToObsoleteTest.cs +++ /dev/null @@ -1,537 +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; - -[Platform("win")] -public sealed class XmlPreviewWindows_DeprecatedToObsoleteTest : DeprecatedToObsoleteTest -{ - protected override Task SimpleStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StructDeclImpl() - { - var inputContents = $@"struct MyStruct0 -{{ - int r; -}}; - -struct [[deprecated]] MyStruct1 -{{ - int r; -}}; - -struct [[deprecated(""This is obsolete."")]] MyStruct2 -{{ - int r; -}}; - -struct MyStruct3 -{{ - int r; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleTypedefStructMembersImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - - [[deprecated]] - {nativeType} g; - - [[deprecated(""This is obsolete."")]] - {nativeType} b; - - {nativeType} a; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefStructDeclImpl() - { - var inputContents = $@"typedef struct -{{ - int r; -}} MyStruct0; - -[[deprecated]] typedef struct -{{ - int r; -}} MyStruct1; - -[[deprecated(""This is obsolete."")]] typedef struct -{{ - int r; -}} MyStruct2; - -typedef struct -{{ - int r; -}} MyStruct3; -"; - - var expectedOutputContents = $@" - - - - - int - - - - Obsolete - - int - - - - Obsolete(""This is obsolete."") - - int - - - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleEnumMembersImpl() - { - var inputContents = $@"enum MyEnum : int -{{ - MyEnum_Value0, - MyEnum_Value1 [[deprecated]], - MyEnum_Value2 [[deprecated(""This is obsolete."")]], - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - Obsolete - int - - - Obsolete(""This is obsolete."") - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task EnumDeclImpl() - { - var inputContents = $@"enum MyEnum0 : int -{{ - MyEnum_Value0, -}}; - -enum [[deprecated]] MyEnum1 : int -{{ - MyEnum_Value1, -}}; - -enum [[deprecated(""This is obsolete."")]] MyEnum2 : int -{{ - MyEnum_Value2, -}}; - - -enum MyEnum3 : int -{{ - MyEnum_Value3, -}}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - Obsolete - int - - int - - - - Obsolete(""This is obsolete."") - int - - int - - - - int - - int - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SimpleVarDeclImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@" -{nativeType} MyVariable0 = 0; - -[[deprecated]] -{nativeType} MyVariable1 = 0; - -[[deprecated(""This is obsolete."")]] -{nativeType} MyVariable2 = 0; - -{nativeType} MyVariable3 = 0;"; - - var expectedOutputContents = $@" - - - - - int - - 0 - - - - Obsolete - int - - 0 - - - - Obsolete(""This is obsolete."") - int - - 0 - - - - int - - 0 - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDeclImpl() - { - var inputContents = @" -void MyFunction0() -{ -} - -[[deprecated]] -void MyFunction1() -{ -} - -[[deprecated(""This is obsolete."")]] -void MyFunction2() -{ -} - -void MyFunction3() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - Obsolete - void - - - - Obsolete(""This is obsolete."") - void - - - - void - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InstanceFuncImpl() - { - var inputContents = @"struct MyStruct -{ - int MyFunction0() { return 0; } - - [[deprecated]] - int MyFunction1() { return 0; } - - [[deprecated(""This is obsolete."")]] - int MyFunction2() { return 0; } - - int MyFunction3() { return 0; } -};"; - - var expectedOutputContents = $@" - - - - - int - return 0; - - - Obsolete - int - return 0; - - - Obsolete(""This is obsolete."") - int - return 0; - - - int - return 0; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncPtrDeclImpl() - { - var inputContents = @" -typedef void (*Callback0)(); -[[deprecated]] typedef void (*Callback1)(); -[[deprecated(""This is obsolete."")]] typedef void (*Callback2)(); -typedef void (*Callback3)(); - -struct MyStruct0 { - Callback0 _callback; -}; -struct MyStruct1 { - Callback1 _callback; -}; -struct MyStruct2 { - Callback2 _callback; -}; -struct MyStruct3 { - Callback3 _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - - Obsolete - delegate* unmanaged[Cdecl]<void> - - - - - Obsolete(""This is obsolete."") - delegate* unmanaged[Cdecl]<void> - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FuncDllImportImpl() - { - var inputContents = @" -extern ""C"" void MyFunction0(); -extern ""C"" [[deprecated]] void MyFunction1(); -extern ""C"" [[deprecated(""This is obsolete."")]] void MyFunction2(); -extern ""C"" void MyFunction3();"; - - var expectedOutputContents = @" - - - - - void - - - Obsolete - void - - - Obsolete(""This is obsolete."") - void - - - void - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/EnumDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/EnumDeclarationTest.cs deleted file mode 100644 index 0f1d75a1..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/EnumDeclarationTest.cs +++ /dev/null @@ -1,730 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlPreviewWindows_EnumDeclarationTest : EnumDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicValueTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value1 = 1, - MyEnum_Value2, - MyEnum_Value3, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task ExplicitTypedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExplicitTypedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"enum MyEnum : {nativeType} -{{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}}; -"; - - var expectedOutputContents = $@" - - - - {EscapeXml(expectedManagedType)} - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - {EscapeXml(expectedManagedType)} - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = @"typedef enum _MyEnum : int -{ - MyEnum_Value1, - MyEnum_Value2, - MyEnum_Value3, -} MyEnum; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - -"; - - var remappedNames = new Dictionary { ["_MyEnum"] = "MyEnum" }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task WithAttributeTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = 1, -}; -"; - - var expectedOutputContents = @" - - - - Flags - int - - int - - 1 - - - - - int - - int - - 1 - - - - - -"; - - var withAttributes = new Dictionary> - { - ["MyEnum1"] = ["Flags"] - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withAttributes: withAttributes); - } - - protected override Task WithNamespaceTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["MyEnum1"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"] - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithNamespaceStarPlusTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 1 - - - - - int - - int - - MyEnum1_Value1 - - - - - -"; - - var withNamespaces = new Dictionary> - { - ["*"] = ["static ClangSharp.Test.MyEnum1"], - ["MyEnum2"] = ["System"] - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withUsings: withNamespaces); - } - - protected override Task WithCastToEnumTypeImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0 = (MyEnum) 10, - MyEnum_Value1 = (MyEnum) MyEnum_Value0, - MyEnum_Value2 = ((MyEnum) 10) + MyEnum_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - (int)(MyEnum)(10) - - - - int - - (int)(MyEnum)(MyEnum_Value0) - - - - int - - ((int)(MyEnum)(10)) + MyEnum_Value1 - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithMultipleEnumsTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 = 10, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 = MyEnum1_Value0, - MyEnum2_Value1 = MyEnum1_Value0 + (MyEnum1) 10, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - 10 - - - - - int - - int - - MyEnum1_Value0 - - - - int - - MyEnum1_Value0 + (int)(MyEnum1)(10) - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - int - - - int - - - - int - - 0x80000000 - - - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithTypeTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - - - -"; - - var withTypes = new Dictionary { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeAndImplicitConversionTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2 = 0x80000000, -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - uint - - - uint - - 0x80000000 - - - - - -"; - - var withTypes = new Dictionary - { - ["MyEnum"] = "uint" - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - uint - - uint - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint" - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithTypeStarOverrideTestImpl() - { - var inputContents = @"enum MyEnum1 : int -{ - MyEnum1_Value0 -}; - -enum MyEnum2 : int -{ - MyEnum2_Value0 -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - - - uint - - uint - - - - -"; - - var withTypes = new Dictionary - { - ["*"] = "uint", - ["MyEnum1"] = "int", - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withTypes: withTypes); - } - - protected override Task WithAnonymousEnumTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -enum MyEnum2 : int -{ - MyEnum2_Value1 = MyEnum1_Value1, -}; -"; - - var expectedOutputContents = @" - - - - int - - int - - MyEnum1_Value1 - - - - - - int - - 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 ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } - - protected override Task WithReferenceToAnonymousEnumEnumeratorTestImpl() - { - var inputContents = @"enum -{ - MyEnum1_Value1 = 1, -}; - -const int MyEnum2_Value1 = MyEnum1_Value1 + 1; -"; - - var expectedOutputContents = @" - - - - - int - - 1 - - - - int - - (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 ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionDeclarationBodyImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionDeclarationBodyImportTest.cs deleted file mode 100644 index 98a64f6a..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionDeclarationBodyImportTest.cs +++ /dev/null @@ -1,1992 +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; - -[Platform("win")] -public sealed class XmlPreviewWindows_FunctionDeclarationBodyImportTest : FunctionDeclarationBodyImportTest -{ - protected override Task ArraySubscriptTestImpl() - { - var inputContents = @"int MyFunction(int* pData, int index) -{ - return pData[index]; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - - int - - return pData[index]; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl() - { - var inputContents = @"void MyFunction() -{ -} -"; - - var expectedOutputContents = @" - - - - - void - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBasicTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorCompareTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(int x, int y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - int - - - int - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BinaryOperatorBooleanTestImpl(string opcode) - { - var inputContents = $@"bool MyFunction(bool x, bool y) -{{ - return x {opcode} y; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - - bool - - - bool - - return x {EscapeXml(opcode)} y; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BreakTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - break; - } - - return 0; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - while (true) - {{ - break; - }} - - return 0; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionTestImpl() - { - var inputContents = @"void MyCalledFunction() -{ -} - -void MyFunction() -{ - MyCalledFunction(); -} -"; - - var expectedOutputContents = $@" - - - - - void - - - - void - MyCalledFunction(); - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallFunctionWithArgsTestImpl() - { - var inputContents = @"void MyCalledFunction(int x, int y) -{ -} - -void MyFunction() -{ - MyCalledFunction(0, 1); -} -"; - - var expectedOutputContents = $@" - - - - - void - - int - - - int - - - - - void - MyCalledFunction(0, 1); - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - { - return 0; - } - - case 1: - case 2: - { - return 3; - } - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 1: - case 2: - {{ - return 3; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CaseNoCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - case 0: - return 0; - - case 2: - case 3: - return 5; - } - - return -1; -} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - switch (value) - {{ - case 0: - {{ - return 0; - }} - - case 2: - case 3: - {{ - return 5; - }} - }} - - return -1; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CompareMultipleEnumTestImpl() - { - var inputContents = @"enum MyEnum : int -{ - MyEnum_Value0, - MyEnum_Value1, - MyEnum_Value2, -}; - -static inline int MyFunction(MyEnum x) -{ - return x == MyEnum_Value0 || - x == MyEnum_Value1 || - x == MyEnum_Value2; -} -"; - - var expectedOutputContents = $@" - - - - int - - int - - - int - - - int - - - - - int - - MyEnum - - return (x == MyEnum_Value0 || x == MyEnum_Value1 || x == MyEnum_Value2) ? 1 : 0; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalOperatorTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - return condition ? lhs : rhs; -} -"; - - var expectedOutputContents = $@" - - - - - int - - bool - - - int - - - int - - return condition ? lhs : rhs; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ContinueTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - while (true) - { - continue; - } - - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - while (true) - { - continue; - } - - return 0; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CStyleFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return (int)input; -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxFunctionalCastTestImpl() - { - var inputContents = @"int MyFunction(float input) -{ - return int(input); -} -"; - - var expectedOutputContents = @" - - - - - int - - float - - return (int)(input); - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxConstCastTestImpl() - { - var inputContents = @"void* MyFunction(const void* input) -{ - return const_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - void* - - void* - - return input; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxDynamicCastTestImpl() - { - var inputContents = @"struct MyStructA -{ - virtual void MyMethod() = 0; -}; - -struct MyStructB : MyStructA { }; - -MyStructB* MyFunction(MyStructA* input) -{ - return dynamic_cast(input); -} -"; - - var expectedOutputContents = $@" - - - - - 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); - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxReinterpretCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return reinterpret_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CxxStaticCastTestImpl() - { - var inputContents = @"int* MyFunction(void* input) -{ - return static_cast(input); -} -"; - - var expectedOutputContents = @" - - - - - int* - - void* - - return (int*)(input); - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DeclTestImpl() - { - var inputContents = @"\ -int MyFunction() -{ - int x = 0; - int y = 1, z = 2; - return x + y + z; -} -"; - - var expectedOutputContents = @" - - - - - int - int x = 0; - int y = 1, z = 2; - - return x + y + z; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - do - { - i++; - } - while (i < count); - - return i; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task DoNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForTestImpl() - { - var inputContents = @"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--) - // { - // x += 2; - // } - - x = 0; - - for (; x < count;) - { - x++; - } - - for (int i = 0;;) - { - i++; - } - - for (x = 0;;) - { - x++; - } - - for (;;) - { - return -1; - } -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ForNonCompoundTestImpl() - { - var inputContents = @"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--) - // x += 2; - - x = 0; - - for (; x < count;) - x++; - - for (int i = 0;;) - i++; - - for (x = 0;;) - x++; - - for (;;) - return -1; -} -"; - - var expectedOutputContents = @" - - - - - 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; - } - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - - return rhs; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - { - return lhs; - } - else - { - return rhs; - } -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseIfTestImpl() - { - var inputContents = @"int MyFunction(bool condition1, int a, int b, bool condition2, int c) -{ - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - - bool - - - int - - if (condition1) - { - return a; - } - else if (condition2) - { - return b; - } - - return c; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task IfElseNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(bool condition, int lhs, int rhs) -{ - if (condition) - return lhs; - else - return rhs; -} -"; - - var expectedOutputContents = @" - - - - - int - - bool - - - int - - - int - - if (condition) - { - return lhs; - } - else - { - return rhs; - } - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForArrayTestImpl() - { - var inputContents = @" -void MyFunction() -{ - int x[4] = { 1, 2, 3, 4 }; - int y[4] = { 1, 2, 3 }; - int z[] = { 1, 2 }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InitListForRecordDeclTestImpl() - { - var inputContents = @"struct MyStruct -{ - float x; - float y; - float z; - float w; -}; - -MyStruct MyFunction1() -{ - return { 1.0f, 2.0f, 3.0f, 4.0f }; -} - -MyStruct MyFunction2() -{ - return { 1.0f, 2.0f, 3.0f }; -} -"; - - var expectedOutputContents = @" - - - - - 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, - }; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MemberTestImpl() - { - var inputContents = @"struct MyStruct -{ - int value; -}; - -int MyFunction1(MyStruct instance) -{ - return instance.value; -} - -int MyFunction2(MyStruct* instance) -{ - return instance->value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - int - - MyStruct - - return instance.value; - - - int - - MyStruct* - - return instance->value; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RefToPtrTestImpl() - { - var inputContents = @"struct MyStruct { - int value; -}; - -bool MyFunction(const MyStruct& lhs, const MyStruct& rhs) -{ - return lhs.value == rhs.value; -} -"; - - var expectedOutputContents = @" - - - - - int - - - - - bool - - MyStruct* - - - MyStruct* - - return lhs->value == rhs->value; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXNullPtrTestImpl() - { - var inputContents = @"void* MyFunction() -{ - return nullptr; -} -"; - - var expectedOutputContents = @" - - - - - void* - return null; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnCXXBooleanLiteralTestImpl(string value) - { - var inputContents = $@"bool MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - bool - return {value}; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralDoubleTestImpl(string value) - { - var inputContents = $@"double MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - double - return {value}; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnFloatingLiteralSingleTestImpl(string value) - { - var inputContents = $@"float MyFunction() -{{ - return {value}; -}} -"; - - var expectedOutputContents = $@" - - - - - float - return {value}; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnEmptyTestImpl() - { - var inputContents = @"void MyFunction() -{ - return; -} -"; - - var expectedOutputContents = @" - - - - - void - return; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnIntegerLiteralInt32TestImpl() - { - var inputContents = @"int MyFunction() -{ - return -1; -} -"; - - var expectedOutputContents = @" - - - - - int - return -1; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task AccessUnionMemberTestImpl() - { - var inputContents = @"union MyUnion -{ - struct { int a; }; -}; - -void MyFunction() -{ - MyUnion myUnion; - myUnion.a = 10; -} -"; - - var expectedOutputContents = @" - - - - - _Anonymous_e__Struct - - - ref int - - return ref Anonymous.a; - - - - - int - - - - - - void - MyUnion myUnion = new MyUnion(); - - myUnion.Anonymous.a = 10; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ReturnStructTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; -}; - -MyStruct MyFunction() -{ - MyStruct myStruct; - return myStruct; -} -"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - - - MyStruct - MyStruct myStruct = new MyStruct(); - - return myStruct; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - { - default: - { - return 0; - } - } -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SwitchNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int value) -{ - switch (value) - default: - { - return 0; - } - - switch (value) - default: - return 0; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - switch (value) - { - default: - { - return 0; - } - } - - switch (value) - { - default: - { - return 0; - } - } - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorAddrOfTestImpl() - { - var inputContents = @"int* MyFunction(int value) -{ - return &value; -} -"; - - var expectedOutputContents = @" - - - - - int* - - int - - return &value; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorDerefTestImpl() - { - var inputContents = @"int MyFunction(int* value) -{ - return *value; -} -"; - - var expectedOutputContents = @" - - - - - int - - int* - - return *value; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorLogicalNotTestImpl() - { - var inputContents = @"bool MyFunction(bool value) -{ - return !value; -} -"; - - var expectedOutputContents = @" - - - - - bool - - bool - - return !value; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPostfixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return value{opcode}; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return value{opcode}; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnaryOperatorPrefixTestImpl(string opcode) - { - var inputContents = $@"int MyFunction(int value) -{{ - return {opcode}value; -}} -"; - - var expectedOutputContents = $@" - - - - - int - - int - - return {opcode}value; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - { - i++; - } - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WhileNonCompoundTestImpl() - { - var inputContents = @"int MyFunction(int count) -{ - int i = 0; - - while (i < count) - i++; - - return i; -} -"; - - var expectedOutputContents = @" - - - - - int - - int - - int i = 0; - - while (i < count) - { - i++; - } - - return i; - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionDeclarationDllImportTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionDeclarationDllImportTest.cs deleted file mode 100644 index 6258e963..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionDeclarationDllImportTest.cs +++ /dev/null @@ -1,464 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlPreviewWindows_FunctionDeclarationDllImportTest : FunctionDeclarationDllImportTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ArrayParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(const float color[4]);"; - - var expectedOutputContents = @" - - - - - void - - float* - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FunctionPointerParameterTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(void (*callback)());"; - - var expectedOutputContents = @" - - - - - void - - delegate* unmanaged[Cdecl]<void> - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NamespaceTestImpl() - { - var inputContents = @"namespace MyNamespace -{ - void MyFunction(); -}"; - - var entryPoint = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "__ZN11MyNamespace10MyFunctionEv" : "_ZN11MyNamespace10MyFunctionEv"; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - entryPoint = "?MyFunction@MyNamespace@@YAXXZ"; - } - - var expectedOutputContents = $@" - - - - - void - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TemplateParameterTestImpl(string nativeType, bool expectedNativeTypeAttr, string expectedManagedType, string expectedUsingStatement) - { - var inputContents = @$"template struct MyTemplate; - -extern ""C"" void MyFunction(MyTemplate<{nativeType}> myStruct);"; - - var expectedOutputContents = $@" - - - - - void - - MyTemplate<{expectedManagedType}> - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task TemplateMemberTestImpl() - { - var inputContents = @$"template struct MyTemplate -{{ -}}; - -struct MyStruct -{{ - MyTemplate a; -}}; -"; - - var expectedOutputContents = $@" - - - - - MyTemplate<IntPtr> - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: TemplateTestExcludedNames); - } - - protected override Task NoLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty); - } - - protected override Task WithLibraryPathTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["MyFunction"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task WithLibraryPathStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction();"; - - var expectedOutputContents = @" - - - - - void - - - - -"; - - var withLibraryPaths = new Dictionary - { - ["*"] = "ClangSharpPInvokeGenerator" - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, libraryPath: string.Empty, withLibraryPaths: withLibraryPaths); - } - - protected override Task OptionalParameterTestImpl(string nativeType, string nativeInit, bool expectedNativeTypeNameAttr, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task OptionalParameterUnsafeTestImpl(string nativeType, string nativeInit, string expectedManagedType, string expectedManagedInit) - { - var inputContents = $@"extern ""C"" void MyFunction({nativeType} value = {nativeInit});"; - - var expectedOutputContents = $@" - - - - - void - - {expectedManagedType} - - {expectedManagedInit} - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithCallConvTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary { - ["MyFunction1"] = "Winapi" - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi" - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithCallConvStarOverrideTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withCallConvs = new Dictionary - { - ["*"] = "Winapi", - ["MyFunction2"] = "StdCall" - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withCallConvs: withCallConvs); - } - - protected override Task WithSetLastErrorTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "MyFunction1" - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task WithSetLastErrorStarTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction1(int value); extern ""C"" void MyFunction2(int value);"; - - var expectedOutputContents = @" - - - - - void - - int - - - - void - - int - - - - - -"; - - var withSetLastErrors = new string[] - { - "*" - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withSetLastErrors: withSetLastErrors); - } - - protected override Task SourceLocationTestImpl() - { - const string InputContents = @"extern ""C"" void MyFunction(float value);"; - - const string ExpectedOutputContents = @" - - - - - void - - float - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } - - protected override Task VarargsTestImpl() => Task.CompletedTask; - - protected override Task IntrinsicsTestImpl() - { - const string InputContents = @"extern ""C"" void __builtin_cpu_init(); -#pragma intrinsic(__builtin_cpu_init)"; - - const string ExpectedOutputContents = @""; - - return ValidateGeneratedCSharpDefaultWindowsBindingsAsync(InputContents, ExpectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionPointerDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionPointerDeclarationTest.cs deleted file mode 100644 index 31ad3ded..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/FunctionPointerDeclarationTest.cs +++ /dev/null @@ -1,82 +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; - -[Platform("win")] -public sealed class XmlPreviewWindows_FunctionPointerDeclarationTest : FunctionPointerDeclarationTest -{ - protected override Task BasicTestImpl() - { - var inputContents = @"typedef void (*Callback)(); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task CallconvTestImpl() - { - var inputContents = @"typedef void (*Callback)() __attribute__((stdcall)); - -struct MyStruct { - Callback _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Stdcall]<void> - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerlessTypedefTestImpl() - { - var inputContents = @"typedef void (Callback)(); - -struct MyStruct { - Callback* _callback; -}; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/StructDeclarationTest.cs deleted file mode 100644 index 75b64af4..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/StructDeclarationTest.cs +++ /dev/null @@ -1,1851 +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; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlPreviewWindows_StructDeclarationTest : StructDeclarationTest -{ - protected override Task IncompleteArraySizeTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} x[]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - return ref Unsafe.Add(ref e0, index); - - - - Span<{expectedManagedType}> - - int - - MemoryMarshal.CreateSpan(ref e0, length); - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyStruct; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldWithNativeBitfieldAttributeTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -struct MyStruct2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -struct MyStruct3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedOutputContents = @" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeBitfieldAttribute); - } - - protected override Task DeclTypeTestImpl() - { - var inputContents = @"extern ""C"" void MyFunction(); - -typedef struct -{ - decltype(&MyFunction) _callback; -} MyStruct; -"; - - var expectedOutputContents = @" - - - - - delegate* unmanaged[Cdecl]<void> - - - - - void - - - - -"; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(3) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(2 * 1 * 3 * 4) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -typedef MyStruct MyBuffer[3]; - -struct MyOtherStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(3) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} value; -}}; - -struct MyOtherStruct -{{ - MyStruct c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyStruct - - - InlineArray(3) - - MyStruct - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(2 * 1 * 3 * 4) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -struct MyStruct -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -struct __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyStruct1 -{{ - int x; -}}; - -struct DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyStruct2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task InheritanceTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task InheritanceWithNativeInheritanceAttributeTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - int x; - int y; -}; - -struct MyStruct1B -{ - int x; - int y; -}; - -struct MyStruct2 : MyStruct1A, MyStruct1B -{ - int z; - int w; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - MyStruct1A - - - MyStruct1B - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateNativeInheritanceAttribute); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef union {{ - {nativeType} value; -}} MyUnion; - -struct MyStruct -{{ - {nativeType} x; - {nativeType} y; - - struct - {{ - {nativeType} z; - - struct - {{ - {nativeType} value; - }} w; - - MyUnion u; - {nativeType} buffer1[4]; - MyUnion buffer2[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Struct - - - ref {expectedManagedType} - - return ref Anonymous.z; - - - - ref _Anonymous_e__Struct._w_e__Struct - - return ref Anonymous.w; - - - - ref MyUnion - - return ref Anonymous.u; - - - - Span<{expectedManagedType}> - - return Anonymous.buffer1; - - - - Span<MyUnion> - - return Anonymous.buffer2; - - - - - {expectedManagedType} - - - _w_e__Struct - - - MyUnion - - - {expectedManagedType} - - - MyUnion - - - - {expectedManagedType} - - - - InlineArray(4) - - {expectedManagedType} - - - - InlineArray(4) - - MyUnion - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"struct MyStruct -{ - int x; - int y; - - struct - { - int z; - - struct - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Struct - - - ref int - - return ref Anonymous.z; - - - - ref int - - return ref Anonymous.Anonymous.w; - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_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); - - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - struct MyNestedStruct - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"struct MyStruct -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef struct MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task PackTestImpl() - { - const string InputContents = @"struct MyStruct1 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; - -#pragma pack(4) - -struct MyStruct2 { - unsigned Field1; - - void* Field2; - - unsigned Field3; -}; -"; - - var packing = Environment.Is64BitProcess ? " layout=\"Sequential\" pack=\"4\"" : string.Empty; - - var expectedOutputContents = $@" - - - - - uint - - - void* - - - uint - - - - - uint - - - void* - - - uint - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(InputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"struct example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef struct example_s example_t; - -struct example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef struct _MyStruct MyStruct;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyStruct"] = "MyStruct" }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"struct MyStruct -{ - double r; - double g; - double b; - - struct - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Struct - - - ref double - - return ref Anonymous.a; - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Struct" - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef struct MyStruct* MyStructPtr; -typedef struct MyStruct& MyStructRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef struct MyStruct MyStruct; - -struct MyStruct -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -struct MyStruct -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UsingDeclarationTestImpl() - { - var inputContents = @"struct MyStruct1A -{ - void MyMethod() { } -}; - -struct MyStruct1B : MyStruct1A -{ - using MyStruct1A::MyMethod; -}; -"; - - var expectedOutputContents = @" - - - - - void - - - - - - void - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WithAccessSpecifierTestImpl() - { - var inputContents = @"struct MyStruct1 -{ - int Field1; - int Field2; -}; - -struct MyStruct2 -{ - int Field1; - int Field2; -}; - -struct MyStruct3 -{ - int Field1; - int Field2; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - - - int - - - int - - - - - int - - - int - - - - -"; - - var withAccessSpecifiers = new Dictionary { - ["MyStruct1"] = AccessSpecifier.Private, - ["MyStruct2"] = AccessSpecifier.Internal, - ["Field1"] = AccessSpecifier.Private, - ["MyStruct3.Field2"] = AccessSpecifier.Internal, - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, withAccessSpecifiers: withAccessSpecifiers); - } - - protected override Task WithPackingTestImpl() - { - const string InputContents = @"struct MyStruct -{ - size_t FixedBuffer[2]; -}; -"; - - const string ExpectedOutputContents = @" - - - - - nuint - - - InlineArray(2) - - nuint - - - - - -"; - - var withPackings = new Dictionary { - ["MyStruct"] = "CustomPackValue" - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(InputContents, ExpectedOutputContents, withPackings: withPackings); - } - - protected override Task SourceLocationAttributeTestImpl() - { - const string InputContents = @"struct MyStruct -{ - int r; - int g; - int b; -}; -"; - - const string ExpectedOutputContents = @" - - - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(InputContents, ExpectedOutputContents, PInvokeGeneratorConfigurationOptions.GenerateSourceLocationAttribute); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/UnionDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/UnionDeclarationTest.cs deleted file mode 100644 index 92e1245d..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/UnionDeclarationTest.cs +++ /dev/null @@ -1,1317 +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.Collections.Generic; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlPreviewWindows_UnionDeclarationTest : UnionDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicTestInCModeImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}} MyUnion; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, commandLineArgs: []); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BitfieldTestImpl() - { - var inputContents = @"union MyUnion1 -{ - unsigned int o0_b0_24 : 24; - unsigned int o4_b0_16 : 16; - unsigned int o4_b16_3 : 3; - int o4_b19_3 : 3; - unsigned char o8_b0_1 : 1; - int o12_b0_1 : 1; - int o12_b1_1 : 1; -}; - -union MyUnion2 -{ - unsigned int o0_b0_1 : 1; - int x; - unsigned int o8_b0_1 : 1; -}; - -union MyUnion3 -{ - unsigned int o0_b0_1 : 1; - unsigned int o0_b1_1 : 1; -}; -"; - - var expectedPack = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @" pack=""1""" : ""; - - var expectedOutputContents = $@" - - - - - 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); - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ExcludeTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - var expectedOutputContents = string.Empty; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: ExcludeTestExcludedNames); - } - - protected override Task FixedSizedBufferNonPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(3) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(2 * 1 * 3 * 4) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -typedef MyUnion MyBuffer[3]; - -union MyOtherUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(3) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferNonPrimitiveWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} value; -}}; - -union MyOtherUnion -{{ - MyUnion c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - MyUnion - - - InlineArray(3) - - MyUnion - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPointerTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - ref {expectedManagedType} - - int - - - fixed ({expectedManagedType}* pThis = &e0) - {{ - return ref pThis[index]; - }} - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[3]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveMultidimensionalTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} c[2][1][3][4]; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(2 * 1 * 3 * 4) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task FixedSizedBufferPrimitiveTypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyBuffer[3]; - -union MyUnion -{{ - MyBuffer c; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - InlineArray(3) - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - protected override Task GuidTestImpl() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Non-Windows doesn't support __declspec(uuid("")) - return Task.CompletedTask; - } - - var inputContents = $@"#define DECLSPEC_UUID(x) __declspec(uuid(x)) - -union __declspec(uuid(""00000000-0000-0000-C000-000000000046"")) MyUnion1 -{{ - int x; -}}; - -union DECLSPEC_UUID(""00000000-0000-0000-C000-000000000047"") MyUnion2 -{{ - int x; -}}; -"; - - var expectedOutputContents = $@" - - - - - int - - - - - int - - - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidTestExcludedNames); - } - - protected override Task NestedAnonymousTestImpl(string nativeType, string expectedManagedType, int line, int column) - { - var inputContents = $@"typedef struct {{ - {nativeType} value; -}} MyStruct; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union - {{ - {nativeType} a; - - MyStruct s; - - {nativeType} buffer[4]; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - _Anonymous_e__Union - - - ref {expectedManagedType} - - return ref Anonymous.a; - - - - ref MyStruct - - return ref Anonymous.s; - - - - Span<{expectedManagedType}> - - return Anonymous.buffer; - - - - - {expectedManagedType} - - - MyStruct - - - {expectedManagedType} - - - InlineArray(4) - - {expectedManagedType} - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedAnonymousWithBitfieldTestImpl() - { - var inputContents = @"union MyUnion -{ - int x; - int y; - - union - { - int z; - - union - { - int w; - int o0_b0_16 : 16; - int o0_b16_4 : 4; - }; - }; -}; -"; - - var expectedOutputContents = @" - - - - - int - - - int - - - _Anonymous_e__Union - - - ref int - - return ref Anonymous.z; - - - - ref int - - return ref Anonymous.Anonymous.w; - - - - int - - return Anonymous.Anonymous.o0_b0_16; - - - Anonymous.Anonymous.o0_b0_16 = value; - - - - int - - return Anonymous.Anonymous.o0_b16_4; - - - Anonymous.Anonymous.o0_b16_4 = value; - - - - - int - - - _Anonymous_e__Union - - - - int - - - int - - - int - - return (_bitfield << 16) >> 16; - - - - _bitfield = (_bitfield & ~0xFFFF) | (value & 0xFFFF); - - - - int - - return (_bitfield << 12) >> 28; - - - - _bitfield = (_bitfield & ~(0xF << 16)) | ((value & 0xF) << 16); - - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - - protected override Task NestedTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NestedWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - - union MyNestedUnion - {{ - {nativeType} r; - {nativeType} g; - {nativeType} b; - {nativeType} a; - }}; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NewKeywordTestImpl() - { - var inputContents = @"union MyUnion -{ - int Equals; - int Dispose; - int GetHashCode; - int GetType; - int MemberwiseClone; - int ReferenceEquals; - int ToString; -};"; - - var expectedOutputContents = $@" - - - - - int - - - int - - - int - - - int - - - int - - - int - - - int - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoDefinitionTestImpl() - { - var inputContents = "typedef union MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfTestImpl() - { - var inputContents = @"union example_s { - example_s* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task PointerToSelfViaTypedefTestImpl() - { - var inputContents = @"typedef union example_s example_t; - -union example_s { - example_t* next; - void* data; -};"; - - var expectedOutputContents = $@" - - - - - example_s* - - - void* - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task RemapTestImpl() - { - var inputContents = "typedef union _MyUnion MyUnion;"; - - var expectedOutputContents = $@" - - - - - -"; - - var remappedNames = new Dictionary { ["_MyUnion"] = "MyUnion" }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task RemapNestedAnonymousTestImpl() - { - var inputContents = @"union MyUnion -{ - double r; - double g; - double b; - - union - { - double a; - }; -};"; - - var expectedOutputContents = @" - - - - - double - - - double - - - double - - - _Anonymous_e__Union - - - ref double - - return ref Anonymous.a; - - - - - double - - - - - -"; - - var remappedNames = new Dictionary { - ["__AnonymousField_ClangUnsavedFile_L7_C5"] = "Anonymous", - ["__AnonymousRecord_ClangUnsavedFile_L7_C5"] = "_Anonymous_e__Union" - }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, remappedNames: remappedNames); - } - - protected override Task SkipNonDefinitionTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionPointerTestImpl() - { - var inputContents = @"typedef union MyUnion* MyUnionPtr; -typedef union MyUnion& MyUnionRef; -"; - - var expectedOutputContents = @" - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task SkipNonDefinitionWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef union MyUnion MyUnion; - -union MyUnion -{{ - {nativeType} r; - {nativeType} g; - {nativeType} b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task TypedefTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"typedef {nativeType} MyTypedefAlias; - -union MyUnion -{{ - MyTypedefAlias r; - MyTypedefAlias g; - MyTypedefAlias b; -}}; -"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - - {expectedManagedType} - - - {expectedManagedType} - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UnionWithAnonStructWithAnonUnionImpl() - { - var inputContents = $@"typedef union _MY_UNION -{{ - long AsArray[2]; - struct - {{ - long First; - union - {{ - struct - {{ - long Second; - }} A; - - struct - {{ - long Second; - }} B; - }}; - }}; -}} MY_UNION;"; - - var expectedOutputContents = $@" - - - - - int - - - _Anonymous_e__Struct - - - ref int - - return ref Anonymous.First; - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._A_e__Struct - - return ref Anonymous.Anonymous.A; - - - - ref _Anonymous_e__Struct._Anonymous_e__Union._B_e__Struct - - return ref Anonymous.Anonymous.B; - - - - - int - - - _Anonymous_e__Union - - - - _A_e__Struct - - - _B_e__Struct - - - - int - - - - - int - - - - - - InlineArray(2) - - int - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } -} diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/VarDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/VarDeclarationTest.cs deleted file mode 100644 index afe0fc7c..00000000 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/XmlPreviewWindows/VarDeclarationTest.cs +++ /dev/null @@ -1,533 +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.Collections.Generic; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace ClangSharp.UnitTests; - -[Platform("win")] -public sealed class XmlPreviewWindows_VarDeclarationTest : VarDeclarationTest -{ - protected override Task BasicTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task BasicWithNativeTypeNameTestImpl(string nativeType, string expectedManagedType) - { - var inputContents = $@"{nativeType} MyVariable = 0;"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - 0 - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task GuidMacroTestImpl() - { - var inputContents = $@"struct GUID {{ - unsigned long Data1; - unsigned short Data2; - unsigned short Data3; - unsigned char Data4[8]; -}}; - -const GUID IID_IUnknown = {{ 0x00000000, 0x0000, 0x0000, {{ 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} }}; -"; - - var expectedOutputContents = $@" - - - - - Guid - - new Guid(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) - - - - - -"; - - var remappedNames = new Dictionary { ["GUID"] = "Guid" }; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: GuidMacroTestExcludedNames, remappedNames: remappedNames); - } - - protected override Task MacroTestImpl(string nativeValue, string expectedManagedType, string expectedManagedValue) - { - var inputContents = $@"#define MyMacro1 {nativeValue} -#define MyMacro2 MyMacro1"; - - var expectedOutputContents = $@" - - - - - {expectedManagedType} - - {expectedManagedValue} - - - - {expectedManagedType} - - {expectedManagedValue} - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultilineMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 0 + \ -1"; - - var expectedOutputContents = $@" - - - - - int - - 0 + 1 - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task NoInitializerTestImpl(string nativeType) - { - var inputContents = $@"{nativeType} MyVariable;"; - var expectedOutputContents = ""; - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf8StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 ""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task Utf16StringLiteralMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 u""Test\0\\\r\n\t\"""""; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralConstTestImpl() - { - var inputContents = $@"const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralConstTestImpl() - { - var inputContents = $@"const char MyConst1[] = ""Test\0\\\r\n\t\""""; -const char* MyConst2 = ""Test\0\\\r\n\t\""""; -const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - byte[] - - ""Test\0\\\r\n\t\""""u8.ToArray() - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task WideStringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const wchar_t MyConst1[] = L""Test\0\\\r\n\t\""""; -static const wchar_t* MyConst2 = L""Test\0\\\r\n\t\""""; -static const wchar_t* const MyConst3 = L""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - string - - ""Test\0\\\r\n\t\"""" - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task StringLiteralStaticConstTestImpl() - { - var inputContents = $@"static const char MyConst1[] = ""Test\0\\\r\n\t\""""; -static const char* MyConst2 = ""Test\0\\\r\n\t\""""; -static const char* const MyConst3 = ""Test\0\\\r\n\t\"""";"; - - var expectedOutputContents = $@" - - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - byte[] - - ""Test\0\\\r\n\t\""""u8.ToArray() - - - - ReadOnlySpan<byte> - - ""Test\0\\\r\n\t\""""u8 - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 (long)0x80000000L -#define MyMacro2 (int)0x80000000"; - - var expectedOutputContents = $@" - - - - - int - - - - (int)(0x80000000) - - - - - - int - - - - (int)(0x80000000) - - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedFunctionLikeCastMacroTestImpl() - { - var inputContents = $@"#define MyMacro1 unsigned(-1)"; - - var expectedOutputContents = $@" - - - - - uint - - - - (uint)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedConversionMacroTest2Impl() - { - var inputContents = $@"#define MyMacro1(x, y, z) ((int)(((unsigned long)(x)<<31) | ((unsigned long)(y)<<16) | ((unsigned long)(z)))) -#define MyMacro2(n) MyMacro1(1, 2, n) -#define MyMacro3 MyMacro2(3)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(((uint)(1) << 31) | ((uint)(2) << 16) | ((uint)(3)))) - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, excludedNames: UncheckedConversionMacroTest2ExcludedNames); - } - - protected override Task UncheckedPointerMacroTestImpl() - { - var inputContents = $@"#define Macro1 ((int*) -1)"; - - var expectedOutputContents = $@" - - - - - int* - - - ((int*)(-1)) - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task UncheckedReinterpretCastMacroTestImpl() - { - var inputContents = $@"#define Macro1 reinterpret_cast(-1)"; - - var expectedOutputContents = $@" - - - - - int* - - - - (int*)(-1) - - - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task MultidimensionlArrayTestImpl() - { - var inputContents = $@"const int MyArray[2][2] = {{ {{ 0, 1 }}, {{ 2, 3 }} }};"; - - var expectedOutputContents = $@" - - - - - int[][] - - new int[2][] - {{ - new int[2] - {{ - 0, - 1, - }}, - new int[2] - {{ - 2, - 3, - }}, - }} - - - - - -"; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents); - } - - protected override Task ConditionalDefineConstTestImpl() - { - var inputContents = @"typedef int TESTRESULT; -#define TESTRESULT_FROM_WIN32(x) ((TESTRESULT)(x) <= 0 ? ((TESTRESULT)(x)) : ((TESTRESULT) (((x) & 0x0000FFFF) | (7 << 16) | 0x80000000))) -#define ADDRESS_IN_USE TESTRESULT_FROM_WIN32(10048)"; - - var expectedOutputContents = $@" - - - - - int - - - ((int)(10048) <= 0 ? ((int)(10048)) : ((int)(((10048) & 0x0000FFFF) | (7 << 16) | 0x80000000))) - - - - - - -"; - var diagnostics = new Diagnostic[] { new Diagnostic(DiagnosticLevel.Warning, "Function like macro definition records are not supported: 'TESTRESULT_FROM_WIN32'. Generated bindings may be incomplete.", "Line 2, Column 9 in ClangUnsavedFile.h") }; - - return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics); - } -}