File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -388,3 +388,10 @@ TEST(base, getPropertyOffset) {
388388 try_call ([]() { auto offset1 = getPropertyOffset (" TestClassNotExists" , " propXt" ); },
389389 " class 'TestClassNotExists' is undefined." );
390390}
391+
392+ TEST (base, call_array) {
393+ auto fn = getFunction (" substr_compare" );
394+ Array arr ({" abcde" , " bc" , 1 , 3 });
395+ auto rs = call (fn, arr);
396+ ASSERT_EQ (rs.toInt (), 1 );
397+ }
Original file line number Diff line number Diff line change @@ -610,3 +610,12 @@ TEST(object, exec) {
610610 auto rs2 = obj.exec (fn2);
611611 ASSERT_GT (rs2.toInt (), 100000000 );
612612}
613+
614+ TEST (object, call_array) {
615+ auto obj = newObject (" DateTime" , " 2000-01-01" );
616+ auto fn = getMethod (obj.ce (), " setTime" );
617+ Array arr ({10 , 10 , 10 });
618+ obj.exec (fn, arr);
619+ auto rs = obj.exec (" format" , " Y-m-d H:i:s" );
620+ ASSERT_STREQ (rs.toCString (), " 2000-01-01 10:10:10" );
621+ }
You can’t perform that action at this time.
0 commit comments