shader: Add compilation tests for Metal

This commit is contained in:
Hajime Hoshi 2020-08-08 21:29:01 +09:00
parent a45e241da1
commit 00a92a21a3

View File

@ -25,6 +25,7 @@ import (
. "github.com/hajimehoshi/ebiten/internal/shader" . "github.com/hajimehoshi/ebiten/internal/shader"
"github.com/hajimehoshi/ebiten/internal/shaderir/glsl" "github.com/hajimehoshi/ebiten/internal/shaderir/glsl"
"github.com/hajimehoshi/ebiten/internal/shaderir/metal"
) )
func normalize(str string) string { func normalize(str string) string {
@ -123,6 +124,10 @@ func TestCompile(t *testing.T) {
t.Errorf("got: %v, want: %v", got, want) t.Errorf("got: %v, want: %v", got, want)
} }
} }
// Just check that Compile doesn't cause panic.
// TODO: Should the results be tested?
metal.Compile(s, "Vertex", "Fragmentp")
}) })
} }
} }