Skip to content

Commit

Permalink
Add test for ConstantSampler clone method
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 1c5464a6275f80fbd464f64f6aa24340c0cb97da
  • Loading branch information
Vertexwahn committed Jun 22, 2024
1 parent 54ea7e9 commit 35c35bf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions devertexwahn/flatland/rendering/sampler_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,12 @@ TEST(PixelCenterSampler, GivenPixelCenterSample_WhenRequestingSample_ThenExpectA
EXPECT_THAT(pcs.next_1d(), .5f);
EXPECT_THAT(pcs.next_2d(), Point2f(.5f, .5f));
}

TEST(ConstantSamplerType, clone) {
PropertySet ps;
ConstantSampler sampler{ps};

auto cloned_sampler = sampler.clone();

EXPECT_THAT(cloned_sampler->to_string(), ::testing::HasSubstr("PixelCenterSampler"));
}

0 comments on commit 35c35bf

Please sign in to comment.