Browse Source

Tentative fix Travis

Christophe Riccio 7 years ago
parent
commit
d479d5bf35
2 changed files with 6 additions and 20 deletions
  1. 6 19
      test/core/core_type_mat3x3.cpp
  2. 0 1
      test/core/core_type_vec3.cpp

+ 6 - 19
test/core/core_type_mat3x3.cpp

@@ -13,31 +13,18 @@
 #include <glm/mat4x2.hpp>
 #include <glm/mat4x2.hpp>
 #include <glm/mat4x3.hpp>
 #include <glm/mat4x3.hpp>
 #include <glm/mat4x4.hpp>
 #include <glm/mat4x4.hpp>
-#include <cstdio>
 #include <vector>
 #include <vector>
 
 
-void print(glm::dmat3 const& Mat0)
-{
-	printf("mat3(\n");
-	printf("\tvec3(%2.3f, %2.3f, %2.3f)\n", Mat0[0][0], Mat0[0][1], Mat0[0][2]);
-	printf("\tvec3(%2.3f, %2.3f, %2.3f)\n", Mat0[1][0], Mat0[1][1], Mat0[1][2]);
-	printf("\tvec3(%2.3f, %2.3f, %2.3f))\n\n", Mat0[2][0], Mat0[2][1], Mat0[2][2]);
-}
-
-int test_mat3x3()
+static int test_mat3x3()
 {
 {
 	glm::dmat3 Mat0(
 	glm::dmat3 Mat0(
-		glm::dvec3(0.6f, 0.2f, 0.3f), 
-		glm::dvec3(0.2f, 0.7f, 0.5f), 
+		glm::dvec3(0.6f, 0.2f, 0.3f),
+		glm::dvec3(0.2f, 0.7f, 0.5f),
 		glm::dvec3(0.3f, 0.5f, 0.7f));
 		glm::dvec3(0.3f, 0.5f, 0.7f));
 	glm::dmat3 Inv0 = glm::inverse(Mat0);
 	glm::dmat3 Inv0 = glm::inverse(Mat0);
 	glm::dmat3 Res0 = Mat0 * Inv0;
 	glm::dmat3 Res0 = Mat0 * Inv0;
 
 
-	print(Mat0);
-	print(Inv0);
-	print(Res0);
-
-	return 0;
+	return glm::all(glm::equal(Res0, glm::dmat3(1.0), 0.01)) ? 0 : 1;
 }
 }
 
 
 static int test_operators()
 static int test_operators()
@@ -59,7 +46,7 @@ static int test_operators()
 	return (S && !R) ? 0 : 1;
 	return (S && !R) ? 0 : 1;
 }
 }
 
 
-int test_inverse()
+static int test_inverse()
 {
 {
 	int Error(0);
 	int Error(0);
 
 
@@ -91,7 +78,7 @@ int test_inverse()
 	return Error;
 	return Error;
 }
 }
 
 
-int test_ctr()
+static int test_ctr()
 {
 {
 	int Error(0);
 	int Error(0);
 
 

+ 0 - 1
test/core/core_type_vec3.cpp

@@ -7,7 +7,6 @@
 #include <glm/vec2.hpp>
 #include <glm/vec2.hpp>
 #include <glm/vec3.hpp>
 #include <glm/vec3.hpp>
 #include <glm/vec4.hpp>
 #include <glm/vec4.hpp>
-#include <cstdio>
 #include <vector>
 #include <vector>
 
 
 static glm::vec3 g1;
 static glm::vec3 g1;