Make to_string(dualquat) actually work.
It segfaulted somewhere deep in strlen() due to a mismatch in printf() argument count.
This commit is contained in:
@@ -129,12 +129,24 @@ int test_string_cast_quaternion()
|
||||
|
||||
}
|
||||
|
||||
int test_string_cast_dual_quaternion()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
glm::dualquat Q0 = glm::dualquat({1.0f, 2.0f, 3.0f, 4.0f}, {5.0f, 6.0f, 7.0f, 8.0f});
|
||||
std::string S0 = glm::to_string(Q0);
|
||||
Error += S0 != std::string("dualquat((1.000000, {2.000000, 3.000000, 4.000000}), (5.000000, {6.000000, 7.000000, 8.000000}))") ? 1 : 0;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
Error += test_string_cast_vector();
|
||||
Error += test_string_cast_matrix();
|
||||
Error += test_string_cast_quaternion();
|
||||
Error += test_string_cast_dual_quaternion();
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user