Add static constants for vec3
- Tests, too
This commit is contained in:
@@ -493,6 +493,21 @@ int test_operator_increment()
|
||||
return Error;
|
||||
}
|
||||
|
||||
int test_vec3_static_const() {
|
||||
int Error(0);
|
||||
|
||||
Error += (glm::ivec3(0, 0, 0) == glm::ivec3::ZERO) ? 0 : 1;
|
||||
Error += (glm::vec3(1, 0, 0) == glm::vec3::X) ? 0 : 1;
|
||||
Error += (glm::bvec3(false, true, false) == glm::bvec3::Y) ? 0 : 1;
|
||||
Error += (glm::bvec3(false, false, true) == glm::bvec3::Z) ? 0 : 1;
|
||||
Error += (glm::dvec3(1, 1, 0) == glm::dvec3::XY) ? 0 : 1;
|
||||
Error += (glm::vec3(1, 0, 1) == glm::vec3::XZ) ? 0 : 1;
|
||||
Error += (glm::uvec3(0u, 1u, 1u) == glm::uvec3::YZ) ? 0 : 1;
|
||||
Error += (glm::dvec3(1, 1, 1) == glm::dvec3::XYZ) ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
@@ -505,6 +520,7 @@ int main()
|
||||
assert(glm::vec3::components == 3);
|
||||
# endif
|
||||
|
||||
Error += test_vec3_static_const();
|
||||
Error += test_vec3_ctor();
|
||||
Error += test_vec3_operators();
|
||||
Error += test_vec3_size();
|
||||
|
||||
Reference in New Issue
Block a user