diff --git a/examples/hello/hello.q b/examples/hello/hello.q index 5688704..e5101a2 100644 --- a/examples/hello/hello.q +++ b/examples/hello/hello.q @@ -1,4 +1,4 @@ main() { syscall(1, 1, 4194305, 3) syscall(60, 0) -} +} \ No newline at end of file diff --git a/src/errors/Error_test.go b/main_test.go similarity index 85% rename from src/errors/Error_test.go rename to main_test.go index 055f187..d7c4539 100644 --- a/src/errors/Error_test.go +++ b/main_test.go @@ -1,4 +1,4 @@ -package errors_test +package main_test import ( "path/filepath" @@ -16,6 +16,7 @@ func TestErrors(t *testing.T) { ExpectedError error }{ {"ExpectedFunctionDefinition.q", errors.ExpectedFunctionDefinition}, + {"ExpectedFunctionName.q", errors.ExpectedFunctionName}, {"ExpectedFunctionParameters.q", errors.ExpectedFunctionParameters}, {"MissingBlockEnd.q", errors.MissingBlockEnd}, {"MissingBlockStart.q", errors.MissingBlockStart}, @@ -27,7 +28,7 @@ func TestErrors(t *testing.T) { name := strings.TrimSuffix(test.File, ".q") t.Run(name, func(t *testing.T) { - b := build.New(filepath.Join("testdata", test.File)) + b := build.New(filepath.Join("tests", "errors", test.File)) _, err := b.Run() assert.NotNil(t, err) assert.Contains(t, err.Error(), test.ExpectedError.Error()) diff --git a/src/errors/testdata/ExpectedFunctionDefinition.q b/tests/errors/ExpectedFunctionDefinition.q similarity index 100% rename from src/errors/testdata/ExpectedFunctionDefinition.q rename to tests/errors/ExpectedFunctionDefinition.q diff --git a/tests/errors/ExpectedFunctionName.q b/tests/errors/ExpectedFunctionName.q new file mode 100644 index 0000000..d800886 --- /dev/null +++ b/tests/errors/ExpectedFunctionName.q @@ -0,0 +1 @@ +123 \ No newline at end of file diff --git a/src/errors/testdata/ExpectedFunctionParameters.q b/tests/errors/ExpectedFunctionParameters.q similarity index 100% rename from src/errors/testdata/ExpectedFunctionParameters.q rename to tests/errors/ExpectedFunctionParameters.q diff --git a/src/errors/testdata/MissingBlockEnd.q b/tests/errors/MissingBlockEnd.q similarity index 100% rename from src/errors/testdata/MissingBlockEnd.q rename to tests/errors/MissingBlockEnd.q diff --git a/src/errors/testdata/MissingBlockStart.q b/tests/errors/MissingBlockStart.q similarity index 100% rename from src/errors/testdata/MissingBlockStart.q rename to tests/errors/MissingBlockStart.q diff --git a/src/errors/testdata/MissingGroupEnd.q b/tests/errors/MissingGroupEnd.q similarity index 100% rename from src/errors/testdata/MissingGroupEnd.q rename to tests/errors/MissingGroupEnd.q diff --git a/src/errors/testdata/MissingGroupStart.q b/tests/errors/MissingGroupStart.q similarity index 100% rename from src/errors/testdata/MissingGroupStart.q rename to tests/errors/MissingGroupStart.q