File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
gdnative-core/src/export/property Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -471,3 +471,13 @@ impl ArrayHint {
471
471
}
472
472
}
473
473
}
474
+
475
+ godot_test ! ( test_enum_hint_without_mapping {
476
+ let hint = EnumHint :: new( vec![ "Foo" . into( ) , "Bar" . into( ) ] ) ;
477
+ assert_eq!( hint. to_godot_hint_string( ) . to_string( ) , "Foo,Bar" . to_string( ) , ) ;
478
+ } ) ;
479
+
480
+ godot_test ! ( test_enum_hint_with_mapping {
481
+ let hint = EnumHint :: with_numbers( vec![ ( "Foo" . into( ) , 42 ) , ( "Bar" . into( ) , 67 ) ] ) ;
482
+ assert_eq!( hint. to_godot_hint_string( ) . to_string( ) , "Foo:42,Bar:67" . to_string( ) , ) ;
483
+ } ) ;
Original file line number Diff line number Diff line change @@ -67,6 +67,9 @@ pub extern "C" fn run_tests(
67
67
status &= gdnative:: core_types:: test_vector3_array_debug ( ) ;
68
68
status &= gdnative:: core_types:: test_transform2d_behavior ( ) ;
69
69
70
+ status &= gdnative:: export:: hint:: test_enum_hint_without_mapping ( ) ;
71
+ status &= gdnative:: export:: hint:: test_enum_hint_with_mapping ( ) ;
72
+
70
73
status &= test_underscore_method_binding ( ) ;
71
74
status &= test_rust_class_construction ( ) ;
72
75
status &= test_from_instance_id ( ) ;
You can’t perform that action at this time.
0 commit comments