Moved tests to a separate directory
This commit is contained in:
parent
d026010d32
commit
f13f7c2800
@ -1,4 +1,4 @@
|
||||
main() {
|
||||
syscall(1, 1, 4194305, 3)
|
||||
syscall(60, 0)
|
||||
}
|
||||
}
|
@ -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())
|
1
tests/errors/ExpectedFunctionName.q
Normal file
1
tests/errors/ExpectedFunctionName.q
Normal file
@ -0,0 +1 @@
|
||||
123
|
Loading…
Reference in New Issue
Block a user