feat: add termcolor in carton.

- add termcolor and its testbench
- add integer() in flag_enum and update its testbench according to the requirements in termcolor.
This commit is contained in:
2025-08-19 13:50:51 +08:00
parent dfc0c127c5
commit 8a72e6a655
8 changed files with 466 additions and 71 deletions

View File

@ -1,6 +1,7 @@
#include <gtest/gtest.h>
#include <yycc.hpp>
#include <yycc/flag_enum.hpp>
#include <cinttypes>
#include <yycc/rust/prelude.hpp>
@ -74,4 +75,9 @@ namespace yycctest::flag_enum {
EXPECT_TRUE(FLAG_ENUM::boolean(TestEnum::MergedBit247));
}
TEST(FlagEnum, Integer) {
EXPECT_EQ(FLAG_ENUM::integer(TestEnum::Empty), UINT8_C(0));
EXPECT_EQ(FLAG_ENUM::integer(TestEnum::Bit1), UINT8_C(1));
}
}