execute IWYU and add some coverage tests.

This commit is contained in:
ArthurSonzogni
2022-04-27 18:57:48 +02:00
parent 84d6e6b3dd
commit d0890f94d1
20 changed files with 124 additions and 96 deletions

View File

@@ -26,18 +26,18 @@ TEST(ColorTest, PrintColor256) {
TEST(ColorTest, PrintTrueCOlor) {
Terminal::SetColorSupport(Terminal::Color::TrueColor);
EXPECT_EQ(Color::RGB(1,2,3).Print(false), "38;2;1;2;3");
EXPECT_EQ(Color::RGB(1,2,3).Print(true), "48;2;1;2;3");
EXPECT_EQ(Color::RGB(1, 2, 3).Print(false), "38;2;1;2;3");
EXPECT_EQ(Color::RGB(1, 2, 3).Print(true), "48;2;1;2;3");
}
TEST(ColorTest, FallbackTo256) {
Terminal::SetColorSupport(Terminal::Color::Palette256);
EXPECT_EQ(Color::RGB(1,2,3).Print(false), "38;5;16");
EXPECT_EQ(Color::RGB(1, 2, 3).Print(false), "38;5;16");
}
TEST(ColorTest, FallbackTo16) {
Terminal::SetColorSupport(Terminal::Color::Palette16);
EXPECT_EQ(Color::RGB(1,2,3).Print(false), "30");
EXPECT_EQ(Color::RGB(1, 2, 3).Print(false), "30");
}
TEST(ColorTest, Litterals) {

View File

@@ -120,7 +120,7 @@ TEST(StringTest, CellToGlyphIndex) {
EXPECT_EQ(combining[2], 2);
}
}
} // namespace ftxui
// Copyright 2020 Arthur Sonzogni. All rights reserved.
// Use of this source code is governed by the MIT license that can be found in
// the LICENSE file.