-
-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix incorrect Auto-Advance flag being disabled. * Add missing double newline between methods. * Add tests for Auto-Advance. * Add `[autoload]` to the project file. * Remove `class_name` from unit tests.
- Loading branch information
Showing
5 changed files
with
27 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
extends GdUnitTestSuite | ||
|
||
## Ensure Auto-Advance is enabled properly using the user input flag. | ||
func test_enable_auto_advance() -> void: | ||
Dialogic.Input.auto_advance.enabled_until_user_input = true | ||
var is_enabled: bool = Dialogic.Input.auto_advance.is_enabled() | ||
|
||
assert(is_enabled == true, "Auto-Advance is not enabled.") | ||
|
||
|
||
## This test was created to ensure a bug was fixed: | ||
## When the user enabled the Auto-Advance until user input, | ||
## the Auto-Advance would still run after the user input. | ||
func test_disable_auto_advance() -> void: | ||
Dialogic.Input.auto_advance.enabled_until_user_input = true | ||
Dialogic.Input.handle_input() | ||
|
||
var is_enabled: bool = Dialogic.Input.auto_advance.is_enabled() | ||
assert(is_enabled == false, "Auto-Advance is still running after input") |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
class_name GdUnitExampleTest | ||
extends GdUnitTestSuite | ||
|
||
func test_example() -> void: | ||
|