From f711d55d465bd8838dc55bde1f4a25d582a6bb6b Mon Sep 17 00:00:00 2001 From: Sophia Pearson Date: Sun, 4 Sep 2022 21:52:27 +0200 Subject: tests: adjust tests to new design --- Tests/Game/test_CommandParser.gd | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Tests/Game/test_CommandParser.gd (limited to 'Tests/Game/test_CommandParser.gd') 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('')) -- cgit v1.2.3