Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KyrietS committed Mar 15, 2024
1 parent 631664f commit 62bba51
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/TestAtlas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,22 @@ TEST(AtlasConstructionTests, shouldBeAbleToSetCharset)
Trex::Atlas atlas(fontPath.data(), 32, charset);
}

TEST(AtlasConstructionTests, shouldBeAbleToSetSdfRenderMode)
TEST(AtlasConstructionTests, shouldBeAbleToUseColorRenderMode)
{
Trex::Atlas atlas(fontPath.data(), 32, Trex::Charset::Full(), Trex::RenderMode::COLOR);
EXPECT_EQ(atlas.GetBitmap().Channels(), 4);
}

TEST(AtlasConstructionTests, shouldBeAbleToUseSdfRenderMode)
{
Trex::Atlas atlas(fontPath.data(), 32, Trex::Charset::Full(), Trex::RenderMode::SDF);
EXPECT_EQ(atlas.GetBitmap().Channels(), 1);
}

TEST(AtlasConstructionTests, shouldBeAbleToSetLcdRenderMode)
TEST(AtlasConstructionTests, shouldBeAbleToUseLcdRenderMode)
{
Trex::Atlas atlas(fontPath.data(), 32, Trex::Charset::Full(), Trex::RenderMode::LCD);
EXPECT_EQ(atlas.GetBitmap().Channels(), 3);
}

TEST(AtlasConstructionTests, shouldBeAbleToSetPadding)
Expand Down

0 comments on commit 62bba51

Please sign in to comment.