mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
ebiten: Add a shader test
This commit is contained in:
parent
e0b8b9945f
commit
0830e897fc
@ -246,6 +246,19 @@ func TestShaderWrongReturn(t *testing.T) {
|
||||
func Fragment(position vec4, texCoord vec2, color vec4) vec4 {
|
||||
return 0.0;
|
||||
}
|
||||
`)); err == nil {
|
||||
t.Errorf("error must be non-nil but was nil")
|
||||
}
|
||||
|
||||
if _, err := NewShader([]byte(`package main
|
||||
|
||||
func Foo() (float, float) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
func Fragment(position vec4, texCoord vec2, color vec4) vec4 {
|
||||
return vec4(0);
|
||||
}
|
||||
`)); err == nil {
|
||||
t.Errorf("error must be non-nil but was nil")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user