Move tests next to their implementations.

This commit is contained in:
ArthurSonzogni
2020-03-26 22:55:59 +01:00
committed by Arthur Sonzogni
parent 20d4ee458a
commit f48bfcff10
5 changed files with 10 additions and 10 deletions

View File

@@ -0,0 +1,31 @@
#include "ftxui/dom/elements.hpp"
#include "ftxui/screen/screen.hpp"
#include "gtest/gtest.h"
using namespace ftxui;
using namespace ftxui;
TEST(GaugeTest, zero) {
auto root = gauge(0);
Screen screen(11, 1);
Render(screen, root.get());
EXPECT_EQ(" ", screen.ToString());
}
TEST(GaugeTest, half) {
auto root = gauge(0.5);
Screen screen(11, 1);
Render(screen, root.get());
EXPECT_EQ("█████▍ ", screen.ToString());
//" ▏▎▍▌▊▉█";
}
TEST(GaugeTest, one) {
auto root = gauge(1.0);
Screen screen(11, 1);
Render(screen, root.get());
EXPECT_EQ("███████████", screen.ToString());
}