diff --git a/shader_test.go b/shader_test.go index 1914a038b..19c3c8aec 100644 --- a/shader_test.go +++ b/shader_test.go @@ -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") }