Skip to content

Commit

Permalink
Improved grid coverage (#737)
Browse files Browse the repository at this point in the history
* Improved coverage Grid
  • Loading branch information
ahcorde authored Oct 12, 2022
1 parent 4a364a2 commit d4d071b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Grid_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ void GridTest::Grid(const std::string &_renderEngine)
grid->SetVerticalCellCount(2u);
EXPECT_EQ(2u, grid->VerticalCellCount());

grid->PreRender();

// create material
MaterialPtr mat = scene->CreateMaterial();
mat->SetAmbient(0.6, 0.7, 0.8);
Expand All @@ -83,6 +85,14 @@ void GridTest::Grid(const std::string &_renderEngine)
EXPECT_EQ(math::Color(0.3f, 0.8f, 0.2f), gridMat->Diffuse());
EXPECT_EQ(math::Color(0.4f, 0.9f, 1.0f), gridMat->Specular());

MaterialPtr matNull = nullptr;
grid->SetMaterial(matNull, false);
gridMat = grid->Material();
ASSERT_NE(nullptr, gridMat);

grid->SetVerticalCellCount(3u);
grid->PreRender();

// Clean up
engine->DestroyScene(scene);
unloadEngine(engine->Name());
Expand Down

0 comments on commit d4d071b

Please sign in to comment.