mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-09 16:10:00 +08:00
26 lines
348 B
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)
|
||
|
|
})
|
||
|
|
}
|
||
|
|
}
|