diff options
Diffstat (limited to 'modules/gdscript/tests')
3 files changed, 12 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/features/export_variable.gd b/modules/gdscript/tests/scripts/parser/features/export_variable.gd index 8b343de5ef..483e6cab0d 100644 --- a/modules/gdscript/tests/scripts/parser/features/export_variable.gd +++ b/modules/gdscript/tests/scripts/parser/features/export_variable.gd @@ -1,6 +1,8 @@ +class_name ExportVariableTest extends Node const Utils = preload("../../utils.notest.gd") +const PreloadedScript = preload("./export_variable.notest.gd") # Built-in types. @export var test_weak_int = 1 @@ -20,6 +22,10 @@ const Utils = preload("../../utils.notest.gd") @export var test_image: Image @export var test_timer: Timer +# Global custom classes. +@export var test_global_class: ExportVariableTest +@export var test_preloaded_script: PreloadedScript + # Arrays. @export var test_array: Array @export var test_array_bool: Array[bool] diff --git a/modules/gdscript/tests/scripts/parser/features/export_variable.notest.gd b/modules/gdscript/tests/scripts/parser/features/export_variable.notest.gd new file mode 100644 index 0000000000..6d064351c1 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/features/export_variable.notest.gd @@ -0,0 +1,2 @@ +class_name ExportPreloadedClassTest +extends Node diff --git a/modules/gdscript/tests/scripts/parser/features/export_variable.out b/modules/gdscript/tests/scripts/parser/features/export_variable.out index 99d7b27130..bb094e14b4 100644 --- a/modules/gdscript/tests/scripts/parser/features/export_variable.out +++ b/modules/gdscript/tests/scripts/parser/features/export_variable.out @@ -23,6 +23,10 @@ var test_image: Image = null hint=RESOURCE_TYPE hint_string="Image" usage=DEFAULT|SCRIPT_VARIABLE class_name=&"Image" var test_timer: Timer = null hint=NODE_TYPE hint_string="Timer" usage=DEFAULT|SCRIPT_VARIABLE class_name=&"Timer" +var test_global_class: ExportVariableTest = null + hint=NODE_TYPE hint_string="ExportVariableTest" usage=DEFAULT|SCRIPT_VARIABLE class_name=&"ExportVariableTest" +var test_preloaded_script: ExportPreloadedClassTest = null + hint=NODE_TYPE hint_string="ExportPreloadedClassTest" usage=DEFAULT|SCRIPT_VARIABLE class_name=&"ExportPreloadedClassTest" var test_array: Array = [] hint=NONE hint_string="" usage=DEFAULT|SCRIPT_VARIABLE class_name=&"" var test_array_bool: Array = Array[bool]([]) |
