extend tests with right-shift op

This commit is contained in:
aoyako 2024-02-26 17:03:19 +09:00
parent 7f01f98200
commit 5f61cf00e5

View File

@ -1341,6 +1341,27 @@ func TestSyntaxOperatorShift(t *testing.T) {
{stmt: "a := ivec2(1) << vec2(2); _ = a", err: true},
{stmt: "a := vec3(1) << ivec2(2); _ = a", err: true},
{stmt: "a := ivec2(1) << vec3(2); _ = a", err: true},
{stmt: "a := 1 >> 2; _ = a", err: false},
{stmt: "a := float(1.0) >> 2; _ = a", err: true},
{stmt: "a := 1 >> float(2.0); _ = a", err: true},
{stmt: "a := ivec2(1) >> 2; _ = a", err: false},
{stmt: "a := 1 >> ivec2(2); _ = a", err: true},
{stmt: "a := ivec2(1) >> float(2.0); _ = a", err: true},
{stmt: "a := float(1.0) >> ivec2(2); _ = a", err: true},
{stmt: "a := ivec2(1) >> ivec2(2); _ = a", err: false},
{stmt: "a := ivec3(1) >> ivec2(2); _ = a", err: true},
{stmt: "a := ivec2(1) >> ivec3(2); _ = a", err: true},
{stmt: "a := 1 >> vec2(2); _ = a", err: true},
{stmt: "a := vec2(1) >> 2; _ = a", err: true},
{stmt: "a := float(1.0) >> vec2(2); _ = a", err: true},
{stmt: "a := vec2(1) >> float(2.0); _ = a", err: true},
{stmt: "a := vec2(1) >> vec2(2); _ = a", err: true},
{stmt: "a := vec2(1) >> vec3(2); _ = a", err: true},
{stmt: "a := vec3(1) >> vec2(2); _ = a", err: true},
{stmt: "a := vec2(1) >> ivec2(2); _ = a", err: true},
{stmt: "a := ivec2(1) >> vec2(2); _ = a", err: true},
{stmt: "a := vec3(1) >> ivec2(2); _ = a", err: true},
{stmt: "a := ivec2(1) >> vec3(2); _ = a", err: true},
}
for _, c := range cases {