From cc215a27c7e6b50d744d8af448c1a9ae2966dfee Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Sun, 11 Aug 2024 14:00:51 +0200 Subject: [PATCH] Added more tests --- tests/errors/ExpectedFunctionName2.q | 1 + tests/errors/MissingBlockEnd2.q | 3 +++ tests/errors_test.go | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 tests/errors/ExpectedFunctionName2.q create mode 100644 tests/errors/MissingBlockEnd2.q diff --git a/tests/errors/ExpectedFunctionName2.q b/tests/errors/ExpectedFunctionName2.q new file mode 100644 index 0000000..5638d8b --- /dev/null +++ b/tests/errors/ExpectedFunctionName2.q @@ -0,0 +1 @@ +"Hello" \ No newline at end of file diff --git a/tests/errors/MissingBlockEnd2.q b/tests/errors/MissingBlockEnd2.q new file mode 100644 index 0000000..5562918 --- /dev/null +++ b/tests/errors/MissingBlockEnd2.q @@ -0,0 +1,3 @@ +main() { + loop { +} \ No newline at end of file diff --git a/tests/errors_test.go b/tests/errors_test.go index 71dbdf9..7ecdddc 100644 --- a/tests/errors_test.go +++ b/tests/errors_test.go @@ -17,6 +17,7 @@ var errs = []struct { {"EmptySwitch.q", errors.EmptySwitch}, {"ExpectedFunctionDefinition.q", errors.ExpectedFunctionDefinition}, {"ExpectedFunctionName.q", errors.ExpectedFunctionName}, + {"ExpectedFunctionName2.q", errors.ExpectedFunctionName}, {"ExpectedFunctionParameters.q", errors.ExpectedFunctionParameters}, {"ExpectedIfBeforeElse.q", errors.ExpectedIfBeforeElse}, {"ExpectedIfBeforeElse2.q", errors.ExpectedIfBeforeElse}, @@ -29,6 +30,7 @@ var errs = []struct { {"InvalidCharacter3.q", &errors.InvalidCharacter{Character: "@"}}, {"InvalidCharacter4.q", &errors.InvalidCharacter{Character: "+++"}}, {"MissingBlockEnd.q", errors.MissingBlockEnd}, + {"MissingBlockEnd2.q", errors.MissingBlockEnd}, {"MissingBlockStart.q", errors.MissingBlockStart}, {"MissingGroupEnd.q", errors.MissingGroupEnd}, {"MissingGroupStart.q", errors.MissingGroupStart},