Skip to content

Commit 9c35f48

Browse files
committed
replaced ansi_colors with termio
1 parent 913e415 commit 9c35f48

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <spdlog/spdlog.h>
66
#include <app/tiny.hpp>
77
#include <string>
8+
#include <termio/termio.hpp>
89
#include <print>
910

1011
constexpr std::string_view BANNER = R"(
@@ -16,8 +17,9 @@ constexpr std::string_view BANNER = R"(
1617
)";
1718

1819
int main() {
20+
using namespace termio::termio;
1921

20-
std::println("{}\nVersion: {}", BANNER, app::tiny::VERSION);
22+
std::println("{}{}\n{}Version: {}{}", green(), BANNER, yellow(), app::tiny::VERSION, reset());
2123
constexpr auto lang = "c++";
2224
spdlog::info("Hello and welcome to {} tiny application, version: {}", lang, app::tiny::VERSION);
2325

tests/main_unit.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
#include <app/tiny.hpp>
88
#include <spdlog/spdlog.h>
99
#include <print>
10+
#include <termio/termio.hpp>
1011
#include <vendor/perftimer.hpp>
1112

1213
perftimer::PerfTimer timer("Catch2 Unit Tests");
14+
using namespace termio::termio;
1315

1416
struct MainTestSetup {
1517

1618
MainTestSetup() {
17-
using namespace colors;
1819
spdlog::set_level(spdlog::level::critical);
1920

2021
// do any config stuff
@@ -23,9 +24,8 @@ struct MainTestSetup {
2324
}
2425

2526
~MainTestSetup() {
26-
using namespace colors;
2727
timer.stop();
28-
std::println("{}Tests complete...{}", bright::cyan, colors::reset);
28+
std::println("{}Tests complete...{}", green(), reset());
2929
timer.show_duration();
3030
// std::println("{}", timer.log.str());
3131
}

0 commit comments

Comments
 (0)