diff options
| author | Sophia Pearson <codergal89@gmail.com> | 2022-09-04 21:52:27 +0200 |
|---|---|---|
| committer | Sophia Pearson <codergal89@gmail.com> | 2022-09-04 21:52:27 +0200 |
| commit | f711d55d465bd8838dc55bde1f4a25d582a6bb6b (patch) | |
| tree | e2b5b2ac79adf23e5f2c475ce11ee1c3c6561f0b /Tests/Game/test_CommandParser.gd | |
| parent | 2f3abbb6f1141f15ef77ac27e431bc66bb0c7899 (diff) | |
| download | texty-f711d55d465bd8838dc55bde1f4a25d582a6bb6b.tar.xz texty-f711d55d465bd8838dc55bde1f4a25d582a6bb6b.zip | |
tests: adjust tests to new design
Diffstat (limited to 'Tests/Game/test_CommandParser.gd')
| -rw-r--r-- | Tests/Game/test_CommandParser.gd | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/Game/test_CommandParser.gd b/Tests/Game/test_CommandParser.gd new file mode 100644 index 0000000..659916e --- /dev/null +++ b/Tests/Game/test_CommandParser.gd @@ -0,0 +1,12 @@ +extends CommandParserTestBase + +const Command = preload("res://Scripts/Game/Command.cs") + +func parse(input: String) -> Command: + return autofree(_instance.TryParse(input)) + +func after_all(): + assert_no_new_orphans() + +func test_parsing_the_empty_string_returns_null(): + assert_null(parse('')) |
