Added bitfieldRotate tests #862

This commit is contained in:
Christophe Riccio 2019-03-01 11:33:32 +01:00
parent 6b62e66a7d
commit daf14f0f74

View File

@ -895,6 +895,22 @@ namespace bitfieldInterleave5
}//namespace bitfieldInterleave5
static int test_bitfieldRotateRight()
{
glm::ivec4 const A = glm::bitfieldRotateRight(glm::ivec4(2), 1);
glm::ivec4 const B = glm::ivec4(2) >> 1;
return A == B;
}
static int test_bitfieldRotateLeft()
{
glm::ivec4 const A = glm::bitfieldRotateLeft(glm::ivec4(2), 1);
glm::ivec4 const B = glm::ivec4(2) << 1;
return A == B;
}
int main()
{
int Error = 0;
@ -908,6 +924,9 @@ int main()
Error += ::bitfieldInterleave4::test();
Error += ::bitfieldInterleave::test();
Error += test_bitfieldRotateRight();
Error += test_bitfieldRotateLeft();
# ifdef NDEBUG
Error += ::mask::perf();
Error += ::bitfieldInterleave::perf();