Move implementation tests to format-impl-test.

This commit is contained in:
Victor Zverovich
2014-09-05 07:12:20 -07:00
parent 93bcad6d8e
commit fe9888a1e2
2 changed files with 9 additions and 21 deletions
+1 -14
View File
@@ -36,7 +36,7 @@
#include <sstream>
// Include format.cc instead of format.h to test implementation-specific stuff.
#include "format.cc"
#include "format.h"
#include "util.h"
#include "gtest-extra.h"
@@ -1226,10 +1226,6 @@ TEST(FormatterTest, FormatNaN) {
double nan = std::numeric_limits<double>::quiet_NaN();
EXPECT_EQ("nan", format("{}", nan));
EXPECT_EQ("+nan", format("{:+}", nan));
if (getsign(-nan))
EXPECT_EQ("-nan", format("{}", -nan));
else
fmt::print("Warning: compiler doesn't handle negative NaN correctly");
EXPECT_EQ(" nan", format("{: }", nan));
EXPECT_EQ("NAN", format("{:F}", nan));
EXPECT_EQ("nan ", format("{:<7}", nan));
@@ -1532,15 +1528,6 @@ TEST(FormatTest, FormatMessageExample) {
format_message(42, "{} happened", "something"));
}
TEST(FormatTest, ArgConverter) {
using fmt::internal::Arg;
Arg arg = Arg();
arg.type = Arg::LONG_LONG;
arg.long_long_value = std::numeric_limits<fmt::LongLong>::max();
ArgConverter<fmt::LongLong>(arg, 'd').visit(arg);
EXPECT_EQ(Arg::LONG_LONG, arg.type);
}
#if FMT_USE_VARIADIC_TEMPLATES
template<typename... Args>
void print_error(const char *file, int line, const char *format,