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()
896896 Assert . That ( foo . ReturnChar16 ( ) , Is . EqualTo ( 'a' ) ) ;
897897 }
898898 }
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+ }
899908}
Original file line number Diff line number Diff line change @@ -1048,3 +1048,11 @@ void overloadPointer(void* p, int i)
10481048void overloadPointer (const void * p, int i)
10491049{
10501050}
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);
15081508DLL_API void takeVoidStarStar (void ** p);
15091509DLL_API void overloadPointer (void * p, int i = 0 );
15101510DLL_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