Added bitfieldRotate tests #862
This commit is contained in:
parent
6b62e66a7d
commit
daf14f0f74
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user