File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -896,4 +896,13 @@ public void TestReturnChar16()
896
896
Assert . That ( foo . ReturnChar16 ( ) , Is . EqualTo ( 'a' ) ) ;
897
897
}
898
898
}
899
+
900
+ [ Test , Ignore ( "Indirect parameters not supported yet" ) ]
901
+ public void TestStructWithCopyCtorByValue ( )
902
+ {
903
+ var structWithCopyCtor = new StructWithCopyCtor ( ) ;
904
+ structWithCopyCtor . MBits = 10 ;
905
+ var ret = Common . TestStructWithCopyCtorByValue ( structWithCopyCtor ) ;
906
+ Assert . That ( ret , Is . EqualTo ( 10 ) ) ;
907
+ }
899
908
}
Original file line number Diff line number Diff line change @@ -1048,3 +1048,11 @@ void overloadPointer(void* p, int i)
1048
1048
void overloadPointer (const void * p, int i)
1049
1049
{
1050
1050
}
1051
+
1052
+ StructWithCopyCtor::StructWithCopyCtor () {}
1053
+ StructWithCopyCtor::StructWithCopyCtor (const StructWithCopyCtor& other) : mBits(other.mBits ) {}
1054
+
1055
+ uint16_t TestStructWithCopyCtorByValue (StructWithCopyCtor s)
1056
+ {
1057
+ return s.mBits ;
1058
+ }
Original file line number Diff line number Diff line change @@ -1508,3 +1508,12 @@ DLL_API void takeReferenceToVoidStar(const void*& p);
1508
1508
DLL_API void takeVoidStarStar (void ** p);
1509
1509
DLL_API void overloadPointer (void * p, int i = 0 );
1510
1510
DLL_API void overloadPointer (const void * p, int i = 0 );
1511
+
1512
+ struct DLL_API StructWithCopyCtor
1513
+ {
1514
+ StructWithCopyCtor ();
1515
+ StructWithCopyCtor (const StructWithCopyCtor& other);
1516
+ uint16_t mBits ;
1517
+ };
1518
+
1519
+ uint16_t DLL_API TestStructWithCopyCtorByValue (StructWithCopyCtor s);
You can’t perform that action at this time.
0 commit comments