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 {
471471 }
472472 }
473473}
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(
6767 status &= gdnative:: core_types:: test_vector3_array_debug ( ) ;
6868 status &= gdnative:: core_types:: test_transform2d_behavior ( ) ;
6969
70+ status &= gdnative:: export:: hint:: test_enum_hint_without_mapping ( ) ;
71+ status &= gdnative:: export:: hint:: test_enum_hint_with_mapping ( ) ;
72+
7073 status &= test_underscore_method_binding ( ) ;
7174 status &= test_rust_class_construction ( ) ;
7275 status &= test_from_instance_id ( ) ;
You can’t perform that action at this time.
0 commit comments