Implement PrintColored.

Thanks https://github.com/jose55 for the idea.
This commit is contained in:
Victor Zverovich
2014-02-19 13:51:23 -08:00
parent 9bb93992b6
commit 6968ef3bb3
3 changed files with 36 additions and 0 deletions

View File

@@ -1462,6 +1462,11 @@ TEST(FormatIntTest, FormatDec) {
EXPECT_EQ("42", FormatDec(42ull));
}
TEST(ColorTest, PrintColored) {
fmt::PrintColored(fmt::RED, "Hello, {}!\n") << "world";
// TODO
}
template <typename T>
std::string str(const T &value) {
return fmt::str(fmt::Format("{0}") << value);