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