File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 11local TestClass = {}
22
33TestClass .some_signal = signal (" arg1" , " arg2" )
4+
45TestClass .empty_array = property { type = Array }
56TestClass .preinitialized_array = Array { 1 , 2 , 3 }
67
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ func test_signal() -> bool:
2020 var obj = test_class .new ()
2121 assert (obj .some_signal is Signal , "Object should have signal defined in script" )
2222 obj .some_signal .connect (_handle_signal )
23+ assert (not _signal_handled )
2324 obj .send_signal ()
2425 assert (_signal_handled , "Signal was not handled" )
2526 return true ;
@@ -36,6 +37,12 @@ func test_array_properties() -> bool:
3637 return true
3738
3839
40+ func test_non_existent_property () -> bool :
41+ var obj = test_class .new ()
42+ assert ("some crazy non-existent property name" not in obj )
43+ return true ;
44+
45+
3946func test_property_getter_function () -> bool :
4047 var obj = test_class .new ()
4148 assert (obj .getter_counter == 1 )
You can’t perform that action at this time.
0 commit comments