mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-28 16:29:34 +08:00
execute IWYU and add some coverage tests.
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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.
|
||||
|
Reference in New Issue
Block a user