-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement GutUtils as Object fix (#565)
* implement GutUtils as Object fix * CHANGES
- Loading branch information
Showing
5 changed files
with
58 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
extends GutTest | ||
# ------------------------------------------------------------------------------ | ||
# This test script is used for spot checking orphans created by GUT. If you | ||
# run GUT with just this script, and you get engine warnings about orphans or | ||
# resources still in use, then GUT has a problem. | ||
# ------------------------------------------------------------------------------ | ||
func test_true(): | ||
assert_true(true) | ||
|
||
func test_false(): | ||
assert_false(false) | ||
|
||
func test_eq_n(): | ||
assert_eq(1, 1) | ||
|
||
func test_eq_s(): | ||
assert_eq('a', 'a') | ||
|
||
func test_with_double_of_script(): | ||
var d = double(load('res://test/resources/doubler_test_objects/double_me.gd')).new() | ||
assert_not_null(d) | ||
|
||
func test_with_double_of_scene(): | ||
var d = double(load('res://test/resources/doubler_test_objects/double_me_scene.tscn')).instantiate() | ||
assert_not_null(d) | ||
|
||
func test_with_script_partial_double_of_script(): | ||
var d = partial_double(load('res://test/resources/doubler_test_objects/double_me.gd')).new() | ||
assert_not_null(d) | ||
|
||
func test_with_partial_double_of_scene(): | ||
var d = partial_double(load('res://test/resources/doubler_test_objects/double_me_scene.tscn')).instantiate() | ||
assert_not_null(d) | ||
|
||
func test_with_spy_on_double_of_script(): | ||
var d = double(load('res://test/resources/doubler_test_objects/double_me.gd')).new() | ||
d.get_value() | ||
assert_called(d, 'get_value') | ||
|
||
func test_with_spy_on_partial_double_of_scene(): | ||
var d = partial_double(load('res://test/resources/doubler_test_objects/double_me_scene.tscn')).instantiate() | ||
d.return_hello() | ||
assert_called(d, 'return_hello') |