Skip to content

Commit

Permalink
More easy fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll committed Jan 16, 2024
1 parent faefa9f commit df3a200
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions graphics/src/OBJLoader_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ TEST_F(OBJLoaderTest, LoadObjBox)
EXPECT_EQ(mat->Diffuse(), math::Color(0.512f, 0.512f, 0.512f, 1.0f));
EXPECT_EQ(mat->Specular(), math::Color(0.25, 0.25, 0.25, 1.0));
EXPECT_DOUBLE_EQ(mat->Transparency(), 0.0);

delete mesh;
}

/////////////////////////////////////////////////
Expand All @@ -73,6 +75,7 @@ TEST_F(OBJLoaderTest, InvalidMaterial)
gz::common::Mesh *mesh = objLoader.Load(meshFilename);

EXPECT_TRUE(mesh != nullptr);
delete mesh;
}

/////////////////////////////////////////////////
Expand Down Expand Up @@ -104,6 +107,7 @@ TEST_F(OBJLoaderTest, PBR)
EXPECT_EQ("LightDome_Metalness.png", pbr->MetalnessMap());
EXPECT_EQ("LightDome_Roughness.png", pbr->RoughnessMap());
EXPECT_EQ("LightDome_Normal.png", pbr->NormalMap());
delete mesh;
}

// load obj file exported by blender - it shoves pbr maps into
Expand Down Expand Up @@ -131,5 +135,6 @@ TEST_F(OBJLoaderTest, PBR)
EXPECT_EQ("mesh_Metal.png", pbr->MetalnessMap());
EXPECT_EQ("mesh_Rough.png", pbr->RoughnessMap());
EXPECT_EQ("mesh_Normal.png", pbr->NormalMap());
delete mesh;
}
}
2 changes: 2 additions & 0 deletions graphics/src/STLLoader_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ TEST_F(STLLoaderTest, LoadSTL)
EXPECT_EQ(math::Vector3d(0, 0, -1), subMesh->Normal(2u));

EXPECT_STREQ("", mesh->SubMeshByIndex(0).lock()->Name().c_str());
delete mesh;

mesh = loader.Load(
common::testing::TestFile("data", "cube_binary.stl"));
Expand Down Expand Up @@ -88,4 +89,5 @@ TEST_F(STLLoaderTest, LoadSTL)
EXPECT_EQ(math::Vector3d(0, 0, -1), subMesh->Normal(2u));

EXPECT_STREQ("", mesh->SubMeshByIndex(0).lock()->Name().c_str());
delete mesh;
}
2 changes: 2 additions & 0 deletions graphics/src/SkeletonAnimation_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ TEST_F(SkeletonAnimation, CheckNoXDisplacement)
new common::SkeletonAnimation("emptyAnimation");
auto xDisplacement = skelAnim->XDisplacement();
ASSERT_FALSE(xDisplacement);

delete skelAnim;
}

0 comments on commit df3a200

Please sign in to comment.