Skip to content

Commit cc84e38

Browse files
committed
Disable Java
1 parent 19732dd commit cc84e38

File tree

3 files changed

+64
-64
lines changed

3 files changed

+64
-64
lines changed

harness/tests/test/unit/test_call_java_class.gd

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ func test_field_set():
2121
java_scene.free()
2222

2323

24-
func test_signal():
25-
var java_scene: JavaTestClass = load("res://java_test_scene.tscn").instantiate()
26-
get_tree().root.add_child(java_scene)
27-
await get_tree().create_timer(1).timeout
28-
java_scene.connect_and_trigger_signal()
29-
assert_true(java_scene.signal_emitted, "Signal should've been emitted in java")
24+
#func test_signal():
25+
# var java_scene: JavaTestClass = load("res://java_test_scene.tscn").instantiate()
26+
# get_tree().root.add_child(java_scene)
27+
# await get_tree().create_timer(1).timeout
28+
# java_scene.connect_and_trigger_signal()
29+
# assert_true(java_scene.signal_emitted, "Signal should've been emitted in java")

harness/tests/test/unit/test_funcref.gd

+25-25
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,36 @@ extends "res://addons/gut/test.gd"
22

33

44
func test_call_without_param():
5-
var func_ref_test_script = FuncRefTest.new()
6-
func_ref_test_script.test_call_without_param()
7-
assert_true(func_ref_test_script.call_flag)
8-
func_ref_test_script.free()
5+
var func_ref_test_script = FuncRefTest.new()
6+
func_ref_test_script.test_call_without_param()
7+
assert_true(func_ref_test_script.call_flag)
8+
func_ref_test_script.free()
99

1010
func test_call_deferred_without_param():
11-
var func_ref_test_script = FuncRefTest.new()
12-
func_ref_test_script.test_call_deferred_without_param()
13-
await get_tree().create_timer(1).timeout
14-
assert_true(func_ref_test_script.call_flag)
15-
func_ref_test_script.free()
11+
var func_ref_test_script = FuncRefTest.new()
12+
func_ref_test_script.test_call_deferred_without_param()
13+
await get_tree().create_timer(1).timeout
14+
assert_true(func_ref_test_script.call_flag)
15+
func_ref_test_script.free()
1616

1717
func test_call_with_param():
18-
var func_ref_test_script = FuncRefTest.new()
19-
func_ref_test_script.test_call_with_param()
20-
assert_true(func_ref_test_script.call_with_param_flag)
21-
func_ref_test_script.free()
18+
var func_ref_test_script = FuncRefTest.new()
19+
func_ref_test_script.test_call_with_param()
20+
assert_true(func_ref_test_script.call_with_param_flag)
21+
func_ref_test_script.free()
2222

2323
func test_call_deferred_with_param():
24-
var func_ref_test_script = FuncRefTest.new()
25-
func_ref_test_script.test_call_deferred_with_param()
26-
await get_tree().create_timer(3).timeout
27-
assert_true(func_ref_test_script.call_with_param_flag)
28-
func_ref_test_script.free()
24+
var func_ref_test_script = FuncRefTest.new()
25+
func_ref_test_script.test_call_deferred_with_param()
26+
await get_tree().create_timer(3).timeout
27+
assert_true(func_ref_test_script.call_with_param_flag)
28+
func_ref_test_script.free()
2929

3030
func test_signal_call():
31-
var func_ref_test_script = FuncRefTest.new()
32-
get_tree().root.add_child(func_ref_test_script)
33-
func_ref_test_script.test_signal_call()
34-
await get_tree().create_timer(1).timeout
35-
assert_true(func_ref_test_script.signal_call_flag)
36-
get_tree().root.remove_child(func_ref_test_script)
37-
func_ref_test_script.free()
31+
var func_ref_test_script = FuncRefTest.new()
32+
get_tree().root.add_child(func_ref_test_script)
33+
func_ref_test_script.test_signal_call()
34+
await get_tree().create_timer(1).timeout
35+
assert_true(func_ref_test_script.signal_call_flag)
36+
get_tree().root.remove_child(func_ref_test_script)
37+
func_ref_test_script.free()
+33-33
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
extends "res://addons/gut/test.gd"
22

33
func test_signal_connection_script_instantiation():
4-
var script = SignalTest.new()
5-
get_tree().root.add_child(script)
6-
assert_eq(script.is_connected("no_param_signal_delegate", Callable(script.other_script, "hook_no_param")), true, "signal \"no_param_signal_delegate\" should be connected to \"otherScript::hook_no_param\"")
7-
assert_eq(script.is_connected("one_param_signal_delegate", Callable(script.other_script, "hook_one_param")), true, "signal \"one_param_signal_delegate\" should be connected to \"otherScript::hook_one_param\"")
8-
assert_eq(script.is_connected("two_param_signal_delegate", Callable(script.other_script, "hook_two_param")), true, "signal \"two_param_signal_delegate\" should be connected to \"otherScript::hook_two_param\"")
4+
var script = SignalTest.new()
5+
get_tree().root.add_child(script)
6+
assert_eq(script.is_connected("no_param_signal_delegate", Callable(script.other_script, "hook_no_param")), true, "signal \"no_param_signal_delegate\" should be connected to \"otherScript::hook_no_param\"")
7+
assert_eq(script.is_connected("one_param_signal_delegate", Callable(script.other_script, "hook_one_param")), true, "signal \"one_param_signal_delegate\" should be connected to \"otherScript::hook_one_param\"")
8+
assert_eq(script.is_connected("two_param_signal_delegate", Callable(script.other_script, "hook_two_param")), true, "signal \"two_param_signal_delegate\" should be connected to \"otherScript::hook_two_param\"")
99

10-
assert_eq(script.is_connected("no_param_signal_field", Callable(script.other_script, "hook_no_param")), true, "signal \"no_param_signal_field\" should be connected to \"otherScript::hook_no_param\"")
11-
assert_eq(script.is_connected("one_param_signal_field", Callable(script.other_script, "hook_one_param")), true, "signal \"one_param_signal_field\" should be connected to \"otherScript::hook_one_param\"")
12-
assert_eq(script.is_connected("two_param_signal_field", Callable(script.other_script, "hook_two_param")), true, "signal \"two_param_signal_field\" should be connected to \"otherScript::hook_two_param\"")
10+
assert_eq(script.is_connected("no_param_signal_field", Callable(script.other_script, "hook_no_param")), true, "signal \"no_param_signal_field\" should be connected to \"otherScript::hook_no_param\"")
11+
assert_eq(script.is_connected("one_param_signal_field", Callable(script.other_script, "hook_one_param")), true, "signal \"one_param_signal_field\" should be connected to \"otherScript::hook_one_param\"")
12+
assert_eq(script.is_connected("two_param_signal_field", Callable(script.other_script, "hook_two_param")), true, "signal \"two_param_signal_field\" should be connected to \"otherScript::hook_two_param\"")
1313

14-
script.free()
14+
script.free()
1515

1616
func test_signal_connection_code():
17-
var invocation_script = load("res://Spatial.tscn").instantiate()
18-
get_tree().root.add_child(invocation_script)
19-
assert_eq(invocation_script.button.is_connected("pressed", Callable(invocation_script.invocation, "hook_no_param")), true, "signal \"pressed\" of button should be connected to \"invocation_script.invocation::hook_no_param\"")
20-
invocation_script.free()
17+
var invocation_script = load("res://Spatial.tscn").instantiate()
18+
get_tree().root.add_child(invocation_script)
19+
assert_eq(invocation_script.button.is_connected("pressed", Callable(invocation_script.invocation, "hook_no_param")), true, "signal \"pressed\" of button should be connected to \"invocation_script.invocation::hook_no_param\"")
20+
invocation_script.free()
2121

2222
func test_signal_emitted_with_multiple_targets():
23-
var script = SignalTest.new()
24-
get_tree().root.add_child(script)
25-
assert_eq(script.array.size(), 16)
26-
assert_eq(script.array[0], Vector2(0,0))
27-
assert_eq(script.array[1], Vector2(1,1))
28-
assert_eq(script.array[2], Vector2(1,2))
29-
assert_eq(script.array[3], Vector2(1,3))
30-
assert_eq(script.array[4], Vector2(1,4))
31-
assert_eq(script.array[5], Vector2(1,5))
32-
assert_eq(script.array[6], Vector2(1,6))
33-
assert_eq(script.array[7], Vector2(1,7))
34-
assert_eq(script.array[8], Vector2(1,7))
35-
assert_eq(script.array[9], Vector2(1,6))
36-
assert_eq(script.array[10], Vector2(1,5))
37-
assert_eq(script.array[11], Vector2(1,4))
38-
assert_eq(script.array[12], Vector2(1,3))
39-
assert_eq(script.array[13], Vector2(1,2))
40-
assert_eq(script.array[14], Vector2(1,1))
41-
assert_eq(script.array[15], Vector2(0,0))
42-
script.free()
23+
var script = SignalTest.new()
24+
get_tree().root.add_child(script)
25+
assert_eq(script.array.size(), 16)
26+
assert_eq(script.array[0], Vector2(0,0))
27+
assert_eq(script.array[1], Vector2(1,1))
28+
assert_eq(script.array[2], Vector2(1,2))
29+
assert_eq(script.array[3], Vector2(1,3))
30+
assert_eq(script.array[4], Vector2(1,4))
31+
assert_eq(script.array[5], Vector2(1,5))
32+
assert_eq(script.array[6], Vector2(1,6))
33+
assert_eq(script.array[7], Vector2(1,7))
34+
assert_eq(script.array[8], Vector2(1,7))
35+
assert_eq(script.array[9], Vector2(1,6))
36+
assert_eq(script.array[10], Vector2(1,5))
37+
assert_eq(script.array[11], Vector2(1,4))
38+
assert_eq(script.array[12], Vector2(1,3))
39+
assert_eq(script.array[13], Vector2(1,2))
40+
assert_eq(script.array[14], Vector2(1,1))
41+
assert_eq(script.array[15], Vector2(0,0))
42+
script.free()

0 commit comments

Comments
 (0)