shaderir: Bug fix: Test failures

Updates #1404
This commit is contained in:
Hajime Hoshi 2020-11-21 19:17:24 +09:00
parent b1d7a5f595
commit b72848dc97

View File

@ -152,7 +152,7 @@ func fieldSelectorExpr(a, b Expr) Expr {
} }
func TestOutput(t *testing.T) { func TestOutput(t *testing.T) {
glslPrelude := glsl.FragmentPrelude + "\n" glslPrelude := glsl.FragmentPrelude(glsl.GLSLVersionDefault) + "\n"
tests := []struct { tests := []struct {
Name string Name string
@ -165,7 +165,7 @@ func TestOutput(t *testing.T) {
Name: "Empty", Name: "Empty",
Program: Program{}, Program: Program{},
GlslVS: ``, GlslVS: ``,
GlslFS: glsl.FragmentPrelude, GlslFS: glsl.FragmentPrelude(glsl.GLSLVersionDefault),
}, },
{ {
Name: "Uniform", Name: "Uniform",
@ -1019,7 +1019,7 @@ void main(void) {
for _, tc := range tests { for _, tc := range tests {
tc := tc tc := tc
t.Run(tc.Name, func(t *testing.T) { t.Run(tc.Name, func(t *testing.T) {
vs, fs := glsl.Compile(&tc.Program) vs, fs := glsl.Compile(&tc.Program, glsl.GLSLVersionDefault)
{ {
got := vs got := vs
want := tc.GlslVS + "\n" want := tc.GlslVS + "\n"