37 #include "resources/config.h"
39 #include <gtest/gtest.h>
46 ASSERT_TRUE(mesh !=
nullptr);
54 ASSERT_FLOAT_EQ(0, mesh->
vertices[0 + 0]);
55 ASSERT_FLOAT_EQ(0, mesh->
vertices[0 + 1]);
56 ASSERT_FLOAT_EQ(1, mesh->
vertices[0 + 2]);
57 ASSERT_FLOAT_EQ(0, mesh->
vertices[3 + 0]);
58 ASSERT_FLOAT_EQ(1, mesh->
vertices[3 + 1]);
59 ASSERT_FLOAT_EQ(0, mesh->
vertices[3 + 2]);
60 ASSERT_FLOAT_EQ(1, mesh->
vertices[6 + 0]);
61 ASSERT_FLOAT_EQ(0, mesh->
vertices[6 + 1]);
62 ASSERT_FLOAT_EQ(0, mesh->
vertices[6 + 2]);
67 std::string path =
"file://" + std::string(TEST_RESOURCES_DIR) +
"/" + mesh;
74 assertMesh(loadMesh(
"triangle.stl"));
79 assertMesh(loadMesh(
"triangle_no_up.dae"));
84 assertMesh(loadMesh(
"triangle_y_up.dae"));
89 assertMesh(loadMesh(
"triangle_z_up.dae"));
94 assertMesh(loadMesh(
"triangle_x_up.dae"));
97 TEST(CreateMesh, daeNoUnit)
99 assertMesh(loadMesh(
"triangle_no_unit.dae"));
104 assertMesh(loadMesh(
"triangle_1m.dae"));
109 assertMesh(loadMesh(
"triangle_10m.dae"));
112 int main(
int argc,
char** argv)
114 testing::InitGoogleTest(&argc, argv);
115 return RUN_ALL_TESTS();