mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-12-02 08:12:59 +08:00
22 lines
754 B
C++
22 lines
754 B
C++
|
#include <gtest/gtest-message.h> // for Message
|
||
|
#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestFactoryImpl, TestPartResult
|
||
|
#include "gtest/gtest_pred_impl.h" // for Test, EXPECT_EQ, TEST
|
||
|
#include <string> // for allocator
|
||
|
#include "ftxui/dom/elements.hpp" // for text, flexbox
|
||
|
#include "ftxui/screen/screen.hpp" // for Screen
|
||
|
|
||
|
namespace ftxui {
|
||
|
|
||
|
TEST(UnderlinedTest, Basic) {
|
||
|
auto element = text("text") | underlined;
|
||
|
Screen screen(5, 1);
|
||
|
Render(screen, element);
|
||
|
EXPECT_TRUE(screen.PixelAt(0,0).underlined);
|
||
|
}
|
||
|
|
||
|
} // namespace ftxui
|
||
|
|
||
|
// 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.
|