Update the API.

This commit is contained in:
Victor Zverovich
2014-06-28 21:56:40 -07:00
parent 856e129cc6
commit d5b8196749
4 changed files with 32 additions and 29 deletions
+1 -8
View File
@@ -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");
-4
View File
@@ -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