aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/spec
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/spec')
-rw-r--r--tests/unit/spec/grammar/parser/parser.go19
-rw-r--r--tests/unit/spec/test/test.go20
2 files changed, 37 insertions, 2 deletions
diff --git a/tests/unit/spec/grammar/parser/parser.go b/tests/unit/spec/grammar/parser/parser.go
index 8170518..72cdc37 100644
--- a/tests/unit/spec/grammar/parser/parser.go
+++ b/tests/unit/spec/grammar/parser/parser.go
@@ -1,12 +1,16 @@
package parser
import (
+ "os"
"strings"
"testing"
+ "testing/internal/testdeps"
verr "urubu/error"
)
+
+
func TestLexer_Run(t *testing.T) {
idTok := func(text string) *token {
return newIDToken(text, newPosition(1, 0))
@@ -1439,4 +1443,17 @@ func testPosition(t *testing.T, pos, expected Position) {
}
-func MainTest() {}
+
+func MainTest() {
+ tests := []testing.InternalTest{
+ { "TestLexer_Run", TestLexer_Run },
+ { "TestParse", TestParse },
+ }
+
+ deps := testdeps.TestDeps{}
+ benchmarks := []testing.InternalBenchmark {}
+ fuzzTargets := []testing.InternalFuzzTarget{}
+ examples := []testing.InternalExample {}
+ m := testing.MainStart(deps, tests, benchmarks, fuzzTargets, examples)
+ os.Exit(m.Run())
+}
diff --git a/tests/unit/spec/test/test.go b/tests/unit/spec/test/test.go
index c6ec8f1..0a77689 100644
--- a/tests/unit/spec/test/test.go
+++ b/tests/unit/spec/test/test.go
@@ -2,11 +2,15 @@ package test
import (
"fmt"
+ "os"
"reflect"
"strings"
"testing"
+ "testing/internal/testdeps"
)
+
+
func TestTree_Format(t *testing.T) {
expected := `(a
(b
@@ -411,4 +415,18 @@ func testTestCase(t *testing.T, expected, actual *TestCase) {
}
-func MainTest() {}
+
+func MainTest() {
+ tests := []testing.InternalTest{
+ { "TestTree_Format", TestTree_Format },
+ { "TestDiffTree", TestDiffTree },
+ { "TestParseTestCase", TestParseTestCase },
+ }
+
+ deps := testdeps.TestDeps{}
+ benchmarks := []testing.InternalBenchmark {}
+ fuzzTargets := []testing.InternalFuzzTarget{}
+ examples := []testing.InternalExample {}
+ m := testing.MainStart(deps, tests, benchmarks, fuzzTargets, examples)
+ os.Exit(m.Run())
+}