diff options
author | Adam Scott <ascott.ca@gmail.com> | 2022-12-26 11:24:17 -0500 |
---|---|---|
committer | Adam Scott <ascott.ca@gmail.com> | 2023-01-10 12:25:35 -0500 |
commit | 44d1d72af19ff7874704fa88d7d08fe4f782c9db (patch) | |
tree | 11f91bb25d41576256c515818aa0d913b95c3374 /modules/gdscript/tests/scripts/analyzer/features | |
parent | 91713ced81792b10fdc9367b7f355738e5d52777 (diff) |
Add GDScript `.editorconfig` rules
- Uniformize `.gd` unit test files indentation to tabs (where needed)
Diffstat (limited to 'modules/gdscript/tests/scripts/analyzer/features')
7 files changed, 73 insertions, 74 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/features/base_outer_resolution.gd b/modules/gdscript/tests/scripts/analyzer/features/base_outer_resolution.gd index 7881a0feb6..a94487d989 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/base_outer_resolution.gd +++ b/modules/gdscript/tests/scripts/analyzer/features/base_outer_resolution.gd @@ -11,4 +11,3 @@ func test() -> void: Extend.InnerClass.InnerInnerClass.test_a_b_c(A.new(), B.new(), C.new()) Extend.InnerClass.InnerInnerClass.test_enum(C.TestEnum.HELLO_WORLD) Extend.InnerClass.InnerInnerClass.test_a_prime(A.APrime.new()) - diff --git a/modules/gdscript/tests/scripts/analyzer/features/class_from_parent.gd b/modules/gdscript/tests/scripts/analyzer/features/class_from_parent.gd index 30e7deb05a..7c846c59bd 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/class_from_parent.gd +++ b/modules/gdscript/tests/scripts/analyzer/features/class_from_parent.gd @@ -1,19 +1,19 @@ class A: - var x = 3 + var x = 3 class B: - var x = 4 + var x = 4 class C: - var x = 5 + var x = 5 class Test: - var a = A.new() - var b: B = B.new() - var c := C.new() + var a = A.new() + var b: B = B.new() + var c := C.new() func test(): - var test_instance := Test.new() - prints(test_instance.a.x) - prints(test_instance.b.x) - prints(test_instance.c.x) + var test_instance := Test.new() + prints(test_instance.a.x) + prints(test_instance.b.x) + prints(test_instance.c.x) diff --git a/modules/gdscript/tests/scripts/analyzer/features/external_enum_as_constant.gd b/modules/gdscript/tests/scripts/analyzer/features/external_enum_as_constant.gd index 757744b6f1..0c740935b9 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/external_enum_as_constant.gd +++ b/modules/gdscript/tests/scripts/analyzer/features/external_enum_as_constant.gd @@ -2,5 +2,5 @@ const External = preload("external_enum_as_constant_external.notest.gd") const MyEnum = External.MyEnum func test(): - print(MyEnum.WAITING == 0) - print(MyEnum.GODOT == 1) + print(MyEnum.WAITING == 0) + print(MyEnum.GODOT == 1) diff --git a/modules/gdscript/tests/scripts/analyzer/features/external_enum_as_constant_external.notest.gd b/modules/gdscript/tests/scripts/analyzer/features/external_enum_as_constant_external.notest.gd index 7c090844d0..24c1e41aab 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/external_enum_as_constant_external.notest.gd +++ b/modules/gdscript/tests/scripts/analyzer/features/external_enum_as_constant_external.notest.gd @@ -1,4 +1,4 @@ enum MyEnum { - WAITING, - GODOT + WAITING, + GODOT } diff --git a/modules/gdscript/tests/scripts/analyzer/features/lookup_class.gd b/modules/gdscript/tests/scripts/analyzer/features/lookup_class.gd index 4a2ab7bcba..541da78332 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/lookup_class.gd +++ b/modules/gdscript/tests/scripts/analyzer/features/lookup_class.gd @@ -1,50 +1,50 @@ # Inner-outer class lookup class A: - const Q: = "right one" + const Q: = "right one" class X: - const Q: = "wrong one" + const Q: = "wrong one" class Y extends X: - class B extends A: - static func check() -> void: - print(Q) + class B extends A: + static func check() -> void: + print(Q) # External class lookup const External: = preload("lookup_class_external.notest.gd") class Internal extends External.A: - static func check() -> void: - print(TARGET) + static func check() -> void: + print(TARGET) - class E extends External.E: - static func check() -> void: - print(TARGET) - print(WAITING) + class E extends External.E: + static func check() -> void: + print(TARGET) + print(WAITING) # Variable lookup class C: - var Q := 'right one' + var Q := 'right one' class D: - const Q := 'wrong one' + const Q := 'wrong one' class E extends D: - class F extends C: - func check() -> void: - print(Q) + class F extends C: + func check() -> void: + print(Q) # Test func test() -> void: - # Inner-outer class lookup - Y.B.check() - print("---") - - # External class lookup - Internal.check() - Internal.E.check() - print("---") - - # Variable lookup - var f: = E.F.new() - f.check() + # Inner-outer class lookup + Y.B.check() + print("---") + + # External class lookup + Internal.check() + Internal.E.check() + print("---") + + # Variable lookup + var f: = E.F.new() + f.check() diff --git a/modules/gdscript/tests/scripts/analyzer/features/lookup_signal.gd b/modules/gdscript/tests/scripts/analyzer/features/lookup_signal.gd index b19d5ee4f9..26cf6c7322 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/lookup_signal.gd +++ b/modules/gdscript/tests/scripts/analyzer/features/lookup_signal.gd @@ -1,41 +1,41 @@ signal hello func get_signal() -> Signal: - return hello + return hello class A: - signal hello + signal hello - func get_signal() -> Signal: - return hello + func get_signal() -> Signal: + return hello - class B: - signal hello + class B: + signal hello - func get_signal() -> Signal: - return hello + func get_signal() -> Signal: + return hello class C extends A.B: - func get_signal() -> Signal: - return hello + func get_signal() -> Signal: + return hello func test(): - var a: = A.new() - var b: = A.B.new() - var c: = C.new() - - var hello_a_result: = hello == a.get_signal() - var hello_b_result: = hello == b.get_signal() - var hello_c_result: = hello == c.get_signal() - var a_b_result: = a.get_signal() == b.get_signal() - var a_c_result: = a.get_signal() == c.get_signal() - var b_c_result: = b.get_signal() == c.get_signal() - var c_c_result: = c.get_signal() == c.get_signal() - - print("hello == A.hello? %s" % hello_a_result) - print("hello == A.B.hello? %s" % hello_b_result) - print("hello == C.hello? %s" % hello_c_result) - print("A.hello == A.B.hello? %s" % a_b_result) - print("A.hello == C.hello? %s" % a_c_result) - print("A.B.hello == C.hello? %s" % b_c_result) - print("C.hello == C.hello? %s" % c_c_result) + var a: = A.new() + var b: = A.B.new() + var c: = C.new() + + var hello_a_result: = hello == a.get_signal() + var hello_b_result: = hello == b.get_signal() + var hello_c_result: = hello == c.get_signal() + var a_b_result: = a.get_signal() == b.get_signal() + var a_c_result: = a.get_signal() == c.get_signal() + var b_c_result: = b.get_signal() == c.get_signal() + var c_c_result: = c.get_signal() == c.get_signal() + + print("hello == A.hello? %s" % hello_a_result) + print("hello == A.B.hello? %s" % hello_b_result) + print("hello == C.hello? %s" % hello_c_result) + print("A.hello == A.B.hello? %s" % a_b_result) + print("A.hello == C.hello? %s" % a_c_result) + print("A.B.hello == C.hello? %s" % b_c_result) + print("C.hello == C.hello? %s" % c_c_result) diff --git a/modules/gdscript/tests/scripts/analyzer/features/return_variant_typed.gd b/modules/gdscript/tests/scripts/analyzer/features/return_variant_typed.gd index c9caef7d7c..95f04421d1 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/return_variant_typed.gd +++ b/modules/gdscript/tests/scripts/analyzer/features/return_variant_typed.gd @@ -1,5 +1,5 @@ func variant() -> Variant: - return 'variant' + return 'variant' func test(): - print(variant()) + print(variant()) |