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.
26 lines
348 B
Go
26 lines
348 B
Go
4 years ago
|
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)
|
||
|
})
|
||
|
}
|
||
|
}
|