@@ -11,7 +11,7 @@ use godot::builtin::{
1111use godot:: classes:: { INode , IRefCounted , Node , Object , RefCounted , Resource , Texture } ;
1212use godot:: global:: { PropertyHint , PropertyUsageFlags } ;
1313use godot:: meta:: { GodotConvert , PropertyHintInfo , ToGodot } ;
14- use godot:: obj:: { Base , EngineBitfield , EngineEnum , Gd , NewAlloc , NewGd , OnEditor } ;
14+ use godot:: obj:: { Base , Gd , NewAlloc , NewGd , OnEditor } ;
1515use godot:: register:: property:: { Export , Var } ;
1616use godot:: register:: { godot_api, Export , GodotClass , GodotConvert , Var } ;
1717use godot:: test:: itest;
@@ -454,10 +454,10 @@ fn derive_export() {
454454 . unwrap ( ) ;
455455 // `class_name` should be empty for non-Object variants.
456456 check_property ( & property, "class_name" , "" ) ;
457- check_property ( & property, "type" , VariantType :: INT . ord ( ) ) ;
458- check_property ( & property, "hint" , PropertyHint :: ENUM . ord ( ) ) ;
457+ check_property ( & property, "type" , VariantType :: INT ) ;
458+ check_property ( & property, "hint" , PropertyHint :: ENUM ) ;
459459 check_property ( & property, "hint_string" , "A:0,B:1,C:2" ) ;
460- check_property ( & property, "usage" , PropertyUsageFlags :: DEFAULT . ord ( ) ) ;
460+ check_property ( & property, "usage" , PropertyUsageFlags :: DEFAULT ) ;
461461}
462462
463463#[ derive( GodotClass ) ]
@@ -489,13 +489,13 @@ fn export_resource() {
489489 . find ( |c| c. get_or_nil ( "name" ) == "my_resource" . to_variant ( ) )
490490 . unwrap ( ) ;
491491 check_property ( & property, "class_name" , "CustomResource" ) ;
492- check_property ( & property, "type" , VariantType :: OBJECT . ord ( ) ) ;
493- check_property ( & property, "hint" , PropertyHint :: RESOURCE_TYPE . ord ( ) ) ;
492+ check_property ( & property, "type" , VariantType :: OBJECT ) ;
493+ check_property ( & property, "hint" , PropertyHint :: RESOURCE_TYPE ) ;
494494 check_property ( & property, "hint_string" , "CustomResource" ) ;
495495 check_property (
496496 & property,
497497 "usage" ,
498- PropertyUsageFlags :: DEFAULT . ord ( ) | PropertyUsageFlags :: EDITOR_INSTANTIATE_OBJECT . ord ( ) ,
498+ PropertyUsageFlags :: DEFAULT | PropertyUsageFlags :: EDITOR_INSTANTIATE_OBJECT ,
499499 ) ;
500500
501501 let property = class
@@ -504,10 +504,10 @@ fn export_resource() {
504504 . find ( |c| c. get_or_nil ( "name" ) == "renamed_resource" . to_variant ( ) )
505505 . unwrap ( ) ;
506506 check_property ( & property, "class_name" , "NewNameCustomResource" ) ;
507- check_property ( & property, "type" , VariantType :: OBJECT . ord ( ) ) ;
508- check_property ( & property, "hint" , PropertyHint :: RESOURCE_TYPE . ord ( ) ) ;
507+ check_property ( & property, "type" , VariantType :: OBJECT ) ;
508+ check_property ( & property, "hint" , PropertyHint :: RESOURCE_TYPE ) ;
509509 check_property ( & property, "hint_string" , "NewNameCustomResource" ) ;
510- check_property ( & property, "usage" , PropertyUsageFlags :: DEFAULT . ord ( ) ) ;
510+ check_property ( & property, "usage" , PropertyUsageFlags :: DEFAULT ) ;
511511
512512 class. free ( ) ;
513513}
@@ -551,9 +551,9 @@ fn override_export() {
551551 . find ( |c| c. get_or_nil ( "name" ) == "resource" . to_variant ( ) )
552552 . unwrap ( ) ;
553553
554- check_property ( & property, "hint" , PropertyHint :: GLOBAL_FILE . ord ( ) ) ;
554+ check_property ( & property, "hint" , PropertyHint :: GLOBAL_FILE ) ;
555555 check_property ( & property, "hint_string" , "SomethingRandom" ) ;
556- check_property ( & property, "usage" , PropertyUsageFlags :: GROUP . ord ( ) ) ;
556+ check_property ( & property, "usage" , PropertyUsageFlags :: GROUP ) ;
557557}
558558
559559fn check_property ( property : & Dictionary , key : & str , expected : impl ToGodot ) {
0 commit comments