grammar_test.go 348 B

12345678910111213141516171819202122232425
  1. package test
  2. import (
  3. "testing"
  4. "github.com/stretchr/testify/assert"
  5. )
  6. var files = []string{
  7. "example",
  8. "empty",
  9. "syntax",
  10. "info",
  11. "types",
  12. "service",
  13. }
  14. func TestGrammar(t *testing.T) {
  15. for _, file := range files {
  16. t.Run(file, func(t *testing.T) {
  17. _, err := parser.Parse("./apis/" + file + ".api")
  18. assert.Nil(t, err)
  19. })
  20. }
  21. }