Move stuff out of internal::Value

This commit is contained in:
Victor Zverovich
2016-12-15 07:51:40 -08:00
parent e1ee5bf0ba
commit 6cba8fe9ba
4 changed files with 107 additions and 109 deletions
+1 -1
View File
@@ -1636,7 +1636,7 @@ class MockArgFormatter : public fmt::internal::ArgFormatterBase<char> {
void operator()(int value) { call(value); }
void operator()(fmt::format_arg::CustomValue) {}
void operator()(fmt::internal::CustomValue) {}
};
void custom_vformat(fmt::CStringRef format_str, fmt::format_args args) {
+3 -3
View File
@@ -434,7 +434,7 @@ TEST(UtilTest, MakeValueWithCustomFormatter) {
namespace fmt {
namespace internal {
bool operator==(Value::CustomValue lhs, Value::CustomValue rhs) {
bool operator==(CustomValue lhs, CustomValue rhs) {
return lhs.value == rhs.value;
}
}
@@ -564,10 +564,10 @@ TEST(UtilTest, PointerArg) {
TEST(UtilTest, CustomArg) {
::Test test;
typedef MockVisitor<Value::CustomValue> Visitor;
typedef MockVisitor<fmt::internal::CustomValue> Visitor;
testing::StrictMock<Visitor> visitor;
EXPECT_CALL(visitor, visit(_)).WillOnce(
testing::Invoke([&](Value::CustomValue custom) {
testing::Invoke([&](fmt::internal::CustomValue custom) {
EXPECT_EQ(&test, custom.value);
fmt::MemoryWriter w;
fmt::format_context ctx("}", fmt::format_args());