FTXUI/src/ftxui/dom/bold_test.cpp

24 lines
709 B
C++
Raw Normal View History

2023-05-02 19:32:37 +08:00
#include <string> // for allocator, string
2022-04-28 16:43:31 +08:00
#include "ftxui/dom/elements.hpp" // for operator|, text, bold, Element
#include "ftxui/dom/node.hpp" // for Render
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
2023-05-02 19:32:37 +08:00
#include "gtest/gtest.h" // for Test, AssertionResult, EXPECT_TRUE, Message, TEST, TestPartResult
// NOLINTBEGIN
namespace ftxui {
TEST(BoldTest, Basic) {
auto element = text("text") | bold;
Screen screen(5, 1);
Render(screen, element);
EXPECT_TRUE(screen.PixelAt(0, 0).bold);
}
} // namespace ftxui
// NOLINTEND
// Copyright 2022 Arthur Sonzogni. All rights reserved.
// Use of this source code is governed by the MIT license that can be found in
// the LICENSE file.