@ -613,39 +613,6 @@ public unsafe class CSharpTests : GeneratorTestFixture
@@ -613,39 +613,6 @@ public unsafe class CSharpTests : GeneratorTestFixture
Assert . That ( CSharp . HasFreeConstant . AnotherUnit . STD_STRING_CONSTANT , Is . EqualTo ( "test" ) ) ;
}
[Test]
public void TestTemplateInternals ( )
{
foreach ( var internalType in new [ ]
{
typeof ( CSharp . IndependentFields . _ _ Internal ) ,
typeof ( CSharp . DependentValueFields . _ _ Internalc__S_DependentValueFields__b ) ,
typeof ( CSharp . DependentValueFields . _ _ Internalc__S_DependentValueFields__f ) ,
typeof ( CSharp . DependentPointerFields . _ _ Internal ) ,
typeof ( CSharp . DependentValueFields . _ _ Internal_Ptr ) ,
typeof ( CSharp . HasDefaultTemplateArgument . _ _ Internalc__S_HasDefaultTemplateArgument__I___S_IndependentFields__I )
} )
{
var independentFields = internalType . GetFields ( BindingFlags . Instance | BindingFlags . NonPublic ) ;
var fieldOffset = ( FieldOffsetAttribute ) independentFields [ 0 ] . GetCustomAttribute ( typeof ( FieldOffsetAttribute ) ) ;
Assert . That ( fieldOffset . Value , Is . EqualTo ( 0 ) ) ;
}
foreach ( var internalType in new Type [ ]
{
typeof ( CSharp . TwoTemplateArgs . _ _ Internal_Ptr ) ,
typeof ( CSharp . TwoTemplateArgs . _ _ Internalc__S_TwoTemplateArgs___I_I ) ,
typeof ( CSharp . TwoTemplateArgs . _ _ Internalc__S_TwoTemplateArgs___I_f )
} )
{
var independentFields = internalType . GetFields ( BindingFlags . Instance | BindingFlags . NonPublic ) ;
Assert . That ( independentFields . Length , Is . EqualTo ( 2 ) ) ;
var fieldOffsetKey = ( FieldOffsetAttribute ) independentFields [ 0 ] . GetCustomAttribute ( typeof ( FieldOffsetAttribute ) ) ;
Assert . That ( fieldOffsetKey . Value , Is . EqualTo ( 0 ) ) ;
var fieldOffsetValue = ( FieldOffsetAttribute ) independentFields [ 1 ] . GetCustomAttribute ( typeof ( FieldOffsetAttribute ) ) ;
Assert . That ( fieldOffsetValue . Value , Is . EqualTo ( Marshal . SizeOf ( IntPtr . Zero ) ) ) ;
}
}
[Test]
public void TestConstantArray ( )
{