diff --git a/test/gtc/gtc_matrix_access.cpp b/test/gtc/gtc_matrix_access.cpp index 74a68670..ed49335b 100644 --- a/test/gtc/gtc_matrix_access.cpp +++ b/test/gtc/gtc_matrix_access.cpp @@ -48,12 +48,40 @@ int test_mat4x4_col_get() int test_mat4x4_row_set() { + int Error = 0; + glm::mat4 m(1); + + glm::row(m, 0, glm::vec4( 0, 1, 2, 3)); + glm::row(m, 1, glm::vec4( 4, 5, 6, 7)); + glm::row(m, 2, glm::vec4( 8, 9, 10, 11)); + glm::row(m, 3, glm::vec4(12, 13, 14, 15)); + + Error += glm::row(m, 0) == glm::vec4( 0, 1, 2, 3) ? 0 : 1; + Error += glm::row(m, 0) == glm::vec4( 4, 5, 6, 7) ? 0 : 1; + Error += glm::row(m, 0) == glm::vec4( 8, 9, 10, 11) ? 0 : 1; + Error += glm::row(m, 0) == glm::vec4(12, 13, 14, 15) ? 0 : 1; + + return Error; } int test_mat4x4_col_set() { + int Error = 0; + glm::mat4 m(1); + + glm::column(m, 0, glm::vec4( 0, 1, 2, 3)); + glm::column(m, 1, glm::vec4( 4, 5, 6, 7)); + glm::column(m, 2, glm::vec4( 8, 9, 10, 11)); + glm::column(m, 3, glm::vec4(12, 13, 14, 15)); + + Error += glm::column(m, 0) == glm::vec4( 0, 1, 2, 3) ? 0 : 1; + Error += glm::column(m, 0) == glm::vec4( 4, 5, 6, 7) ? 0 : 1; + Error += glm::column(m, 0) == glm::vec4( 8, 9, 10, 11) ? 0 : 1; + Error += glm::column(m, 0) == glm::vec4(12, 13, 14, 15) ? 0 : 1; + + return Error; } int main() @@ -61,7 +89,7 @@ int main() int Error = 0; Error += test_mat4x4_row_get(); - Error += test_mat4x4_col_set(); + Error += test_mat4x4_col_get(); Error += test_mat4x4_row_set(); Error += test_mat4x4_col_set();