Skip to content

Commit a81871a

Browse files
committed
Add simple test for vec_swizzle
1 parent 8afe61e commit a81871a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/gtx/gtx_vec_swizzle.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,27 @@ int main()
66
int Error = 0;
77

88

9+
10+
11+
12+
{
13+
glm::ivec2 const v(1, 2);
14+
Error += xx(v).x != xx(v).y;
15+
Error += yy(v).x != yy(v).y;
16+
}
17+
18+
{
19+
glm::ivec3 const v(1, 2, 3);
20+
Error += zyx(v) != glm::ivec3(3, 2, 1);
21+
}
22+
23+
{
24+
glm::ivec4 const v(1, 2, 3, 4);
25+
Error += wwww(v) != glm::ivec4(4);
26+
Error += wzyx(v) != glm::ivec4(4,3,2,1);
27+
28+
}
29+
930
return Error;
1031
}
1132

0 commit comments

Comments
 (0)