From 6fe4972aa48a29d0aafee0461ccd6c635ca9ee6c Mon Sep 17 00:00:00 2001 From: Sophia Pearson Date: Mon, 23 May 2022 00:02:58 +0200 Subject: commands: add basic command parser infrastructure --- Tests/ComponentTests/ParserTests/test_CommandParser.gd | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Tests/ComponentTests/ParserTests/test_CommandParser.gd (limited to 'Tests/ComponentTests/ParserTests/test_CommandParser.gd') diff --git a/Tests/ComponentTests/ParserTests/test_CommandParser.gd b/Tests/ComponentTests/ParserTests/test_CommandParser.gd new file mode 100644 index 0000000..bdb14a6 --- /dev/null +++ b/Tests/ComponentTests/ParserTests/test_CommandParser.gd @@ -0,0 +1,9 @@ +extends CommandParserTestBase + +const Command = preload("res://Scripts/Command.cs") + +func parse(input: String) -> Command: + return autofree(_instance.TryParse(input)) + +func test_parsing_the_empty_string_returns_null(): + assert_null(parse('')) -- cgit v1.2.3