diff options
Diffstat (limited to 'tests/unit/grammar/grammar.go')
-rw-r--r-- | tests/unit/grammar/grammar.go | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/unit/grammar/grammar.go b/tests/unit/grammar/grammar.go index fe66976..20e9a02 100644 --- a/tests/unit/grammar/grammar.go +++ b/tests/unit/grammar/grammar.go @@ -2,14 +2,18 @@ package grammar import ( "fmt" + "os" "strings" "testing" + "testing/internal/testdeps" verr "urubu/error" "urubu/grammar/symbol" "urubu/spec/grammar/parser" ) + + type first struct { lhs string num int @@ -4647,4 +4651,22 @@ func withLookAhead(item *lrItem, lookAhead ...symbol.Symbol) *lrItem { } -func MainTest() {} + +func MainTest() { + tests := []testing.InternalTest{ + { "TestGenFirst", TestGenFirst }, + { "TestGrammarBuilderOK", TestGrammarBuilderOK }, + { "TestGrammarBuilderSpecError", TestGrammarBuilderSpecError }, + { "TestGenLALR1Automaton", TestGenLALR1Automaton }, + { "TestGenLR0Automaton", TestGenLR0Automaton }, + { "TestLR0AutomatonContainingEmptyProduction", TestLR0AutomatonContainingEmptyProduction }, + { "TestGenLALRParsingTable", TestGenLALRParsingTable }, + } + + deps := testdeps.TestDeps{} + benchmarks := []testing.InternalBenchmark {} + fuzzTargets := []testing.InternalFuzzTarget{} + examples := []testing.InternalExample {} + m := testing.MainStart(deps, tests, benchmarks, fuzzTargets, examples) + os.Exit(m.Run()) +} |