Moved tests to a separate directory

This commit is contained in:
Eduard Urbach 2024-06-14 10:36:01 +02:00
parent d026010d32
commit f13f7c2800
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0
9 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
main() {
syscall(1, 1, 4194305, 3)
syscall(60, 0)
}
}

View File

@ -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())

View File

@ -0,0 +1 @@
123