aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/tester/tester.go
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-12-12 11:04:07 -0300
committerEuAndreh <eu@euandre.org>2024-12-12 11:04:07 -0300
commit597687f4aea38ef19d12e0fdaf021fa4faba8f02 (patch)
treee65ffaa7c9fc4f39826c36825e73eb81765add16 /tests/unit/tester/tester.go
parentBuild and run existing test executables with no actual tests (diff)
downloadcotia-597687f4aea38ef19d12e0fdaf021fa4faba8f02.tar.gz
cotia-597687f4aea38ef19d12e0fdaf021fa4faba8f02.tar.xz
tests/unit/: Actually run existing tests
Diffstat (limited to 'tests/unit/tester/tester.go')
-rw-r--r--tests/unit/tester/tester.go18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/unit/tester/tester.go b/tests/unit/tester/tester.go
index 9245cc4..41e92ae 100644
--- a/tests/unit/tester/tester.go
+++ b/tests/unit/tester/tester.go
@@ -2,14 +2,18 @@ package tester
import (
"fmt"
+ "os"
"strings"
"testing"
+ "testing/internal/testdeps"
"urubu/grammar"
"urubu/spec/grammar/parser"
tspec "urubu/spec/test"
)
+
+
func TestTester_Run(t *testing.T) {
grammarSrc1 := `
#name test;
@@ -169,4 +173,16 @@ foo foo foo
}
-func MainTest() {}
+
+func MainTest() {
+ tests := []testing.InternalTest{
+ { "TestTester_Run", TestTester_Run },
+ }
+
+ deps := testdeps.TestDeps{}
+ benchmarks := []testing.InternalBenchmark {}
+ fuzzTargets := []testing.InternalFuzzTarget{}
+ examples := []testing.InternalExample {}
+ m := testing.MainStart(deps, tests, benchmarks, fuzzTargets, examples)
+ os.Exit(m.Run())
+}