summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts/runtime
diff options
context:
space:
mode:
authorDanil Alexeev <danil@alexeev.xyz>2023-12-19 20:56:30 +0300
committerDanil Alexeev <danil@alexeev.xyz>2023-12-19 20:56:30 +0300
commit3a3a2011f4e5fae48fb3d556a15fda0206f92671 (patch)
tree776ff2341aff9d822efb475ba977a39e95f8d501 /modules/gdscript/tests/scripts/runtime
parent1f5d4a62e9e9a8227ad63155b080fbbfac899571 (diff)
downloadredot-engine-3a3a2011f4e5fae48fb3d556a15fda0206f92671.tar.gz
GDScript: Add `@export_storage` annotation
Diffstat (limited to 'modules/gdscript/tests/scripts/runtime')
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.gd12
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.out9
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/member_info.gd2
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/member_info.out6
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/member_info_inheritance.gd2
5 files changed, 17 insertions, 14 deletions
diff --git a/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.gd b/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.gd
index e46f24cc5f..0133d7fcfc 100644
--- a/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.gd
+++ b/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.gd
@@ -1,17 +1,17 @@
-extends RefCounted # TODO: Fix standalone annotations parsing.
+const Utils = preload("../../utils.notest.gd")
# GH-73843
@export_group("Resource")
# GH-78252
-@export var prop_1: int
-@export_category("prop_1")
-@export var prop_2: int
+@export var test_1: int
+@export_category("test_1")
+@export var test_2: int
func test():
var resource := Resource.new()
prints("Not shadowed:", resource.get_class())
for property in get_property_list():
- if property.name in ["prop_1", "prop_2"]:
- print(property)
+ if str(property.name).begins_with("test_"):
+ Utils.print_property_extended_info(property, self)
diff --git a/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.out b/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.out
index 96ae84e986..9387ec50d7 100644
--- a/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.out
+++ b/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.out
@@ -1,5 +1,8 @@
GDTEST_OK
Not shadowed: Resource
-{ "name": "prop_1", "class_name": &"", "type": 2, "hint": 0, "hint_string": "int", "usage": 4102 }
-{ "name": "prop_1", "class_name": &"", "type": 0, "hint": 0, "hint_string": "", "usage": 128 }
-{ "name": "prop_2", "class_name": &"", "type": 2, "hint": 0, "hint_string": "int", "usage": 4102 }
+var test_1: int = 0
+ hint=NONE hint_string="int" usage=DEFAULT|SCRIPT_VARIABLE
+@export_category("test_1")
+ hint=NONE hint_string="" usage=CATEGORY
+var test_2: int = 0
+ hint=NONE hint_string="int" usage=DEFAULT|SCRIPT_VARIABLE
diff --git a/modules/gdscript/tests/scripts/runtime/features/member_info.gd b/modules/gdscript/tests/scripts/runtime/features/member_info.gd
index 805ea42455..6fe9647b4d 100644
--- a/modules/gdscript/tests/scripts/runtime/features/member_info.gd
+++ b/modules/gdscript/tests/scripts/runtime/features/member_info.gd
@@ -60,7 +60,7 @@ func test():
var script: Script = get_script()
for property in script.get_property_list():
if str(property.name).begins_with("test_"):
- print(Utils.get_property_signature(property, true))
+ print(Utils.get_property_signature(property, null, true))
for property in get_property_list():
if str(property.name).begins_with("test_"):
print(Utils.get_property_signature(property))
diff --git a/modules/gdscript/tests/scripts/runtime/features/member_info.out b/modules/gdscript/tests/scripts/runtime/features/member_info.out
index 3a91507da9..7c826ac05a 100644
--- a/modules/gdscript/tests/scripts/runtime/features/member_info.out
+++ b/modules/gdscript/tests/scripts/runtime/features/member_info.out
@@ -6,13 +6,13 @@ static var test_static_var_hard_int: int
var test_var_untyped: Variant
var test_var_weak_null: Variant
var test_var_weak_int: Variant
-@export var test_var_weak_int_exported: int
+var test_var_weak_int_exported: int
var test_var_weak_variant_type: Variant
-@export var test_var_weak_variant_type_exported: Variant.Type
+var test_var_weak_variant_type_exported: Variant.Type
var test_var_hard_variant: Variant
var test_var_hard_int: int
var test_var_hard_variant_type: Variant.Type
-@export var test_var_hard_variant_type_exported: Variant.Type
+var test_var_hard_variant_type_exported: Variant.Type
var test_var_hard_node_process_mode: Node.ProcessMode
var test_var_hard_my_enum: TestMemberInfo.MyEnum
var test_var_hard_array: Array
diff --git a/modules/gdscript/tests/scripts/runtime/features/member_info_inheritance.gd b/modules/gdscript/tests/scripts/runtime/features/member_info_inheritance.gd
index d0cbeeab85..563c6ce569 100644
--- a/modules/gdscript/tests/scripts/runtime/features/member_info_inheritance.gd
+++ b/modules/gdscript/tests/scripts/runtime/features/member_info_inheritance.gd
@@ -30,7 +30,7 @@ func test():
var b := B.new()
for property in (B as GDScript).get_property_list():
if str(property.name).begins_with("test_"):
- print(Utils.get_property_signature(property, true))
+ print(Utils.get_property_signature(property, null, true))
print("---")
for property in b.get_property_list():
if str(property.name).begins_with("test_"):