mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-29 16:39:34 +08:00
Add code coverage support. (#378)
This commit is contained in:
@@ -8,8 +8,7 @@
|
||||
#include "ftxui/screen/screen.hpp" // for Screen
|
||||
#include "gtest/gtest_pred_impl.h" // for Test, EXPECT_EQ, TEST
|
||||
|
||||
using namespace ftxui;
|
||||
using namespace ftxui;
|
||||
namespace ftxui {
|
||||
|
||||
TEST(GaugeTest, ZeroHorizontal) {
|
||||
auto root = gauge(0);
|
||||
@@ -24,7 +23,11 @@ TEST(GaugeTest, HalfHorizontal) {
|
||||
Screen screen(11, 1);
|
||||
Render(screen, root);
|
||||
|
||||
#if defined(FTXUI_MICROSOFT_TERMINAL_FALLBACK)
|
||||
EXPECT_EQ("█████▌ ", screen.ToString());
|
||||
#else
|
||||
EXPECT_EQ("█████▍ ", screen.ToString());
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST(GaugeTest, OneHorizontal) {
|
||||
@@ -95,6 +98,8 @@ TEST(GaugeTest, OneVertical) {
|
||||
screen.ToString());
|
||||
}
|
||||
|
||||
} // 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