2022-04-26 23:04:34 +08:00
|
|
|
#include <gtest/gtest-message.h> // for Message
|
|
|
|
#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestFactoryImpl, TestPartResult
|
2022-06-12 23:08:22 +08:00
|
|
|
#include <gtest/gtest.h> // for Test, AssertionResult, TestInfo (ptr only), EXPECT_TRUE, TEST
|
|
|
|
#include <string> // for allocator
|
2022-04-28 16:43:31 +08:00
|
|
|
|
|
|
|
#include "ftxui/dom/elements.hpp" // for operator|, text, underlined, Element
|
|
|
|
#include "ftxui/dom/node.hpp" // for Render
|
|
|
|
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
|
2022-04-26 23:04:34 +08:00
|
|
|
|
|
|
|
namespace ftxui {
|
|
|
|
|
|
|
|
TEST(UnderlinedTest, Basic) {
|
|
|
|
auto element = text("text") | underlined;
|
|
|
|
Screen screen(5, 1);
|
|
|
|
Render(screen, element);
|
2022-04-28 00:57:48 +08:00
|
|
|
EXPECT_TRUE(screen.PixelAt(0, 0).underlined);
|
2022-04-26 23:04:34 +08:00
|
|
|
}
|
|
|
|
|
2022-04-28 00:57:48 +08:00
|
|
|
} // namespace ftxui
|
2022-04-26 23:04:34 +08:00
|
|
|
|
|
|
|
// 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.
|