From c12e9a319548a9e8d495ebbadcab7a68af9a970c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 4 Nov 2021 15:37:57 +0100 Subject: [PATCH] test: Style cleanup after opening in 3.4 --- test/project.godot | 2 -- test/script.gd | 50 +++++++++++++++++++++++----------------------- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/test/project.godot b/test/project.godot index c9e426ae..a3e6045d 100644 --- a/test/project.godot +++ b/test/project.godot @@ -10,10 +10,8 @@ config_version=4 _global_script_classes=[ ] _global_script_class_icons={ - } [application] config/name="Test CI project" - diff --git a/test/script.gd b/test/script.gd index d9b0fe10..94f8ecbb 100644 --- a/test/script.gd +++ b/test/script.gd @@ -1,30 +1,30 @@ - extends MainLoop + func _initialize(): - OS.exit_code = 1 - var native_script = load("res://gdexample.gdns") - print("Native Script ", native_script) - if native_script == null || !is_instance_valid(native_script): - return - print("Library ", native_script.library) - if native_script.library == null || !is_instance_valid(native_script.library): - return - var ref = native_script.new() - print("Reference ", ref) - if ref == null || !is_instance_valid(ref): - return - print("Reference name ", ref.name) - if ref.name != "SimpleClass": - return - print("Reference value ", ref.value) - if ref.value != 0: - return - print("Call method ", ref.method(1)) - if ref.method(1) != 1: - return - OS.exit_code = 0 + OS.exit_code = 1 + var native_script = load("res://gdexample.gdns") + print("Native Script ", native_script) + if not native_script || !is_instance_valid(native_script): + return + print("Library ", native_script.library) + if not native_script.library || !is_instance_valid(native_script.library): + return + var ref = native_script.new() + print("Reference ", ref) + if not ref || !is_instance_valid(ref): + return + print("Reference name ", ref.name) + if ref.name != "SimpleClass": + return + print("Reference value ", ref.value) + if ref.value != 0: + return + print("Call method ", ref.method(1)) + if ref.method(1) != 1: + return + OS.exit_code = 0 + func _idle(_delta): - return true - + return true