Skip to content

Commit

Permalink
Add corner cases testing SamplerState::bind()
Browse files Browse the repository at this point in the history
Reviewed By: corporateshark

Differential Revision: D65423041

fbshipit-source-id: f7176a61be858d07f8e4252538d693408f0009a4
  • Loading branch information
Samhan Salahuddin authored and facebook-github-bot committed Dec 18, 2024
1 parent 5742225 commit b4f86dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/igl/tests/ogl/SamplerState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,11 @@ TEST_F(SamplerStateOGLTest, SamplerStateConvertAddressMode) {
GL_MIRRORED_REPEAT);
}

TEST_F(SamplerStateOGLTest, BindNullTexture) {
auto dummySamplerState =
std::make_unique<igl::opengl::SamplerState>(*context_, SamplerStateDesc::newLinear());
dummySamplerState->bind(nullptr);
EXPECT_TRUE(true); // Expect no crash
}

} // namespace igl::tests

0 comments on commit b4f86dd

Please sign in to comment.