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/lexical/dfa/dfa.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/lexical/dfa/dfa.go')
| -rw-r--r-- | tests/unit/grammar/lexical/dfa/dfa.go | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/unit/grammar/lexical/dfa/dfa.go b/tests/unit/grammar/lexical/dfa/dfa.go index 3233969..b3c0b75 100644 --- a/tests/unit/grammar/lexical/dfa/dfa.go +++ b/tests/unit/grammar/lexical/dfa/dfa.go @@ -2,13 +2,17 @@ package dfa import ( "fmt" + "os" "strings" "testing" + "testing/internal/testdeps" "urubu/grammar/lexical/parser" spec "urubu/spec/grammar" ) + + func TestGenDFA(t *testing.T) { p := parser.NewParser(spec.LexKindName("test"), strings.NewReader("(a|b)*abb")) cpt, err := p.Parse() @@ -442,4 +446,19 @@ func testSymbolTable(t *testing.T, expected, actual *symbolTable) { } -func MainTest() {} + +func MainTest() { + tests := []testing.InternalTest{ + { "TestGenDFA", TestGenDFA }, + { "TestNewSymbolPosition", TestNewSymbolPosition }, + { "TestByteTree", TestByteTree }, + { "TestFollowAndSymbolTable", TestFollowAndSymbolTable }, + } + + deps := testdeps.TestDeps{} + benchmarks := []testing.InternalBenchmark {} + fuzzTargets := []testing.InternalFuzzTarget{} + examples := []testing.InternalExample {} + m := testing.MainStart(deps, tests, benchmarks, fuzzTargets, examples) + os.Exit(m.Run()) +} |
