Update the API.
This commit is contained in:
+1
-8
@@ -1590,16 +1590,9 @@ TEST(FormatIntTest, FormatDec) {
|
||||
TEST(FormatTest, Print) {
|
||||
EXPECT_WRITE(stdout, fmt::print("Don't {}!", "panic"), "Don't panic!");
|
||||
EXPECT_WRITE(stderr,
|
||||
fmt::Print(stderr, "Don't {}!") << "panic", "Don't panic!");
|
||||
fmt::print(stderr, "Don't {}!", "panic"), "Don't panic!");
|
||||
}
|
||||
|
||||
#if FMT_USE_VARIADIC_TEMPLATES && FMT_USE_RVALUE_REFERENCES
|
||||
TEST(FormatTest, PrintVariadic) {
|
||||
EXPECT_WRITE(stderr,
|
||||
fmt::Print(stderr, "Don't {}!", "panic"), "Don't panic!");
|
||||
}
|
||||
#endif // FMT_USE_VARIADIC_TEMPLATES
|
||||
|
||||
TEST(FormatTest, PrintColored) {
|
||||
EXPECT_WRITE(stdout, fmt::PrintColored(fmt::RED, "Hello, {}!\n") << "world",
|
||||
"\x1b[31mHello, world!\n\x1b[0m");
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
#include "gtest-extra.h"
|
||||
#include "util.h"
|
||||
|
||||
#if FMT_USE_VARIADIC_TEMPLATES && FMT_USE_RVALUE_REFERENCES
|
||||
|
||||
using fmt::format;
|
||||
using fmt::FormatError;
|
||||
|
||||
@@ -283,5 +281,3 @@ TEST(PrintfTest, Length) {
|
||||
}
|
||||
|
||||
// TODO: test type specifier
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user