diff options
Diffstat (limited to 'cmd/vartan/test.go')
-rw-r--r-- | cmd/vartan/test.go | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/cmd/vartan/test.go b/cmd/vartan/test.go index 50ba8ca..9bd88ff 100644 --- a/cmd/vartan/test.go +++ b/cmd/vartan/test.go @@ -5,7 +5,6 @@ import ( "fmt" "os" - "github.com/nihei9/vartan/grammar" "github.com/nihei9/vartan/tester" "github.com/spf13/cobra" ) @@ -22,14 +21,10 @@ func init() { } func runTest(cmd *cobra.Command, args []string) error { - g, err := readGrammar(args[0]) + gram, _, err := readGrammar(args[0]) if err != nil { return fmt.Errorf("Cannot read a grammar: %w", err) } - cg, _, err := grammar.Compile(g) - if err != nil { - return fmt.Errorf("Cannot read a compiled grammar: %w", err) - } var cs []*tester.TestCaseWithMetadata { @@ -47,7 +42,7 @@ func runTest(cmd *cobra.Command, args []string) error { } t := &tester.Tester{ - Grammar: cg, + Grammar: gram, Cases: cs, } rs := t.Run() |