Skip to content

Commit

Permalink
Fix FontInfo tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dacap committed May 3, 2024
1 parent 06edd8a commit 757f937
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/font_info_tests.cpp
Expand Up @@ -47,10 +47,16 @@ TEST(FontInfo, ByFile)
TEST(FontInfo, BySystem)
{
FontInfo a(FontInfo::Type::System, "FreeMono");
FontInfo b(FontInfo::Type::System, "DejaVu Serif", 12, true);
FontInfo b(FontInfo::Type::System, "DejaVu Serif", 12, text::FontStyle(), true);
FontInfo c(FontInfo::Type::System, "Arial", 14, text::FontStyle::Bold(), false);
FontInfo d(FontInfo::Type::System, "Arial", 16, text::FontStyle::BoldItalic(), false);
EXPECT_EQ("system=FreeMono", base::convert_to<std::string>(a));
EXPECT_EQ("system=DejaVu Serif,size=12,antialias", base::convert_to<std::string>(b));
EXPECT_EQ("system=Arial,size=14,bold", base::convert_to<std::string>(c));
EXPECT_EQ("system=Arial,size=16,bold,italic", base::convert_to<std::string>(d));

EXPECT_EQ(a, base::convert_to<FontInfo>("system=FreeMono"s));
EXPECT_EQ(b, base::convert_to<FontInfo>("system=DejaVu Serif,size=12,antialias"s));
EXPECT_EQ(c, base::convert_to<FontInfo>("system=Arial,size=14,bold"s));
EXPECT_EQ(d, base::convert_to<FontInfo>("system=Arial,size=16,bold,italic"s));
}

0 comments on commit 757f937

Please sign in to comment.