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/ComponentTests/ParserTests/CommandParserTestBase.gd | |
| parent | 2f3abbb6f1141f15ef77ac27e431bc66bb0c7899 (diff) | |
| download | texty-f711d55d465bd8838dc55bde1f4a25d582a6bb6b.tar.xz texty-f711d55d465bd8838dc55bde1f4a25d582a6bb6b.zip | |
tests: adjust tests to new design
Diffstat (limited to 'Tests/ComponentTests/ParserTests/CommandParserTestBase.gd')
| -rw-r--r-- | Tests/ComponentTests/ParserTests/CommandParserTestBase.gd | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/Tests/ComponentTests/ParserTests/CommandParserTestBase.gd b/Tests/ComponentTests/ParserTests/CommandParserTestBase.gd deleted file mode 100644 index 6e452cb..0000000 --- a/Tests/ComponentTests/ParserTests/CommandParserTestBase.gd +++ /dev/null @@ -1,29 +0,0 @@ -extends GutTest - -class_name CommandParserTestBase - -const CommandParser = preload("res://Scripts/CommandParser.cs") - -var _instance: CommandParser - -func _to_bits(number: int, bits: int) -> Array: - var result = [] - for bit in bits: - result.append(number & 1) - number = number >> 1 - return result - -func before_each(): - _instance = autofree(CommandParser.new()) - -func generate_capitalization_permutations(text: String) -> Array: - var result = [] - - for permutation in pow(2, text.length()): - var mask = _to_bits(permutation, text.length()) - var copy = String(text) - for index in len(mask): - if mask[index] == 1: - copy[index] = copy[index].to_upper() - result.append(copy) - return result; |
