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/grammar/lexical/lexical.go | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'tests/unit/grammar/lexical/lexical.go') diff --git a/tests/unit/grammar/lexical/lexical.go b/tests/unit/grammar/lexical/lexical.go index 54cace4..288bd3c 100644 --- a/tests/unit/grammar/lexical/lexical.go +++ b/tests/unit/grammar/lexical/lexical.go @@ -3,11 +3,15 @@ package lexical import ( "encoding/json" "fmt" + "os" "testing" + "testing/internal/testdeps" spec "urubu/spec/grammar" ) + + func TestLexSpec_Validate(t *testing.T) { // We expect that the spelling inconsistency error will occur. spec := &LexSpec{ @@ -338,4 +342,19 @@ func TestCompile(t *testing.T) { } -func MainTest() {} + +func MainTest() { + tests := []testing.InternalTest{ + { "TestLexSpec_Validate", TestLexSpec_Validate }, + { "TestSnakeCaseToUpperCamelCase", TestSnakeCaseToUpperCamelCase }, + { "TestFindSpellingInconsistencies", TestFindSpellingInconsistencies }, + { "TestCompile", TestCompile }, + } + + 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