diff options
Diffstat (limited to 'tests/tester.cc')
-rw-r--r-- | tests/tester.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/tester.cc b/tests/tester.cc index 649451d..a76359a 100644 --- a/tests/tester.cc +++ b/tests/tester.cc @@ -585,6 +585,26 @@ TEST_CASE("refl", "[refl]") { REQUIRE(materials[0].reflection_texname.compare("reflection.tga") == 0); } +TEST_CASE("map_Bump", "[bump]") { + tinyobj::attrib_t attrib; + std::vector<tinyobj::shape_t> shapes; + std::vector<tinyobj::material_t> materials; + + std::string err; + bool ret = tinyobj::LoadObj(&attrib, &shapes, &materials, &err, "../models/map-bump.obj", gMtlBasePath); + + if (!err.empty()) { + std::cerr << err << std::endl; + } + + PrintInfo(attrib, shapes, materials); + + REQUIRE(true == ret); + REQUIRE(2 == materials.size()); + + REQUIRE(materials[0].bump_texname.compare("bump.jpg") == 0); +} + #if 0 int main( |