diff options
| author | EuAndreh <eu@euandre.org> | 2024-12-12 11:04:07 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2024-12-12 11:04:07 -0300 |
| commit | 597687f4aea38ef19d12e0fdaf021fa4faba8f02 (patch) | |
| tree | e65ffaa7c9fc4f39826c36825e73eb81765add16 /tests/unit/grammar/grammar.go | |
| parent | Build and run existing test executables with no actual tests (diff) | |
| download | urubu-597687f4aea38ef19d12e0fdaf021fa4faba8f02.tar.gz urubu-597687f4aea38ef19d12e0fdaf021fa4faba8f02.tar.xz | |
tests/unit/: Actually run existing tests
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()) +} |
