Add constructor tests

This commit is contained in:
Jesse Talavera-Greenberg 2016-03-06 19:44:12 -05:00
parent b60047fa16
commit 1e63a1a426
2 changed files with 11 additions and 0 deletions

View File

@ -100,6 +100,11 @@ int test_vec3_ctor()
}
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
Error += (glm::ivec3(glm::vec2(4.0f, 5.0f)) == glm::ivec3(4, 5, 0)) ? 0 : 1;
Error += (glm::ivec3(glm::vec2(5, 6)) == glm::ivec3(5, 6, 0)) ? 0 : 1;
Error += (glm::bvec3(glm::vec2(4.0f, 5.0f)) == glm::bvec3(true, true, false)) ? 0 : 1;
Error += (glm::ivec3(glm::dvec3(1.0, 1.0, 1.0)) == glm::ivec3(1, 1, 1)) ? 0 : 1;
return Error;
}
@ -131,6 +136,10 @@ int test_vec4_ctor()
}
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
Error += (glm::ivec4(glm::vec2(4.0f, 5.0f)) == glm::ivec4(4, 5, 0, 0)) ? 0 : 1;
Error += (glm::vec4(glm::vec3(4.0f, 5.0f, 7.0f)) == glm::vec4(4.0f, 5.0f, 7.0f, 0)) ? 0 : 1;
Error += (glm::uvec4(glm::bvec4(true, true, false, true)) == glm::uvec4(1, 1, 0, 1)) ? 0 : 1;
return Error;
}

View File

@ -277,6 +277,8 @@ int test_quat_type()
glm::quat A;
glm::dquat B;
glm::dquat C(A);
return 0;
}