You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-zero/tools/goctl/api/parser/g4/test/grammar_test.go

26 lines
348 B
Go

package test
import (
"testing"
"github.com/stretchr/testify/assert"
)
var files = []string{
"example",
"empty",
"syntax",
"info",
"types",
"service",
}
func TestGrammar(t *testing.T) {
for _, file := range files {
t.Run(file, func(t *testing.T) {
_, err := parser.Parse("./apis/" + file + ".api")
assert.Nil(t, err)
})
}
}