Coverage decorator (#384)

Add code coverage for colors and decorators.
This commit is contained in:
Arthur Sonzogni
2022-04-26 17:04:34 +02:00
committed by GitHub
parent 764c24ef40
commit 04b36df567
14 changed files with 410 additions and 12 deletions

View File

@@ -0,0 +1,21 @@
#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(BlinkTest, Basic) {
auto element = text("text") | blink;
Screen screen(5, 1);
Render(screen, element);
EXPECT_TRUE(screen.PixelAt(0,0).blink);
}
} // 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.