diff --git a/test/gtx/CMakeLists.txt b/test/gtx/CMakeLists.txt index 38387f78..b7a44b8d 100644 --- a/test/gtx/CMakeLists.txt +++ b/test/gtx/CMakeLists.txt @@ -5,5 +5,6 @@ glmCreateTestGTC(gtx_random) glmCreateTestGTC(gtx_rotate_vector) glmCreateTestGTC(gtx_simd_vec4) glmCreateTestGTC(gtx_simd_mat4) +glmCreateTestGTC(gtx_string_cast) glmCreateTestGTC(gtx_ulp) glmCreateTestGTC(gtx_vector_angle) diff --git a/test/gtx/gtx_string_cast.cpp b/test/gtx/gtx_string_cast.cpp new file mode 100644 index 00000000..fedb43cc --- /dev/null +++ b/test/gtx/gtx_string_cast.cpp @@ -0,0 +1,43 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2011-09-01 +// Updated : 2011-09-01 +// Licence : This source is under MIT licence +// File : test/gtx/string_cast.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include + +int test_string_cast_vec() +{ + int Error = 0; + + glm::vec2 A1(1, 2); + + std::string A2 = glm::to_string(A1); + + Error += A2 != std::string("fvec2(1.000000, 2.000000)") ? 1 : 0; + + return Error; +} + +int test_string_cast_mat() +{ + int Error = 0; + + return Error; +} + +int main() +{ + int Error = 0; + Error += test_string_cast_vec(); + Error += test_string_cast_mat(); + return Error; +} + +