From 597687f4aea38ef19d12e0fdaf021fa4faba8f02 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 12 Dec 2024 11:04:07 -0300 Subject: tests/unit/: Actually run existing tests --- tests/unit/spec/grammar/parser/parser.go | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'tests/unit/spec/grammar/parser/parser.go') 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()) +} -- cgit v1.2.3