Fix usages of ASSERT_MSG that creates empty __VA_ARGS__.

Invoking a variadic macro with zero variadic args is illegal until
C++20. The extra calls to fmt::format were unnecessary, anyway.
This commit is contained in:
Allison Vacanti
2021-02-04 18:54:20 -05:00
parent a12d17c1ca
commit e302583c67
7 changed files with 50 additions and 88 deletions

View File

@@ -141,8 +141,7 @@ Params: Float: 13 Int: 3 String: Three
)expected";
const std::string test = fmt::to_string(buffer);
ASSERT_MSG(test == ref,
fmt::format("Expected:\n\"{}\"\n\nActual:\n\"{}\"", ref, test));
ASSERT_MSG(test == ref, "Expected:\n\"{}\"\n\nActual:\n\"{}\"", ref, test);
}
void test_types()
@@ -190,8 +189,7 @@ Params: FloatT: F64 IntT: I64 MiscT: void
)expected";
const std::string test = fmt::to_string(buffer);
ASSERT_MSG(test == ref,
fmt::format("Expected:\n\"{}\"\n\nActual:\n\"{}\"", ref, test));
ASSERT_MSG(test == ref, "Expected:\n\"{}\"\n\nActual:\n\"{}\"", ref, test);
}
void test_both()
@@ -451,8 +449,7 @@ Params: Float: 13 FloatT: F64 Int: 3 IntT: I64 MiscT: void String: Three
)expected";
const std::string test = fmt::to_string(buffer);
ASSERT_MSG(test == ref,
fmt::format("Expected:\n\"{}\"\n\nActual:\n\"{}\"", ref, test));
ASSERT_MSG(test == ref, "Expected:\n\"{}\"\n\nActual:\n\"{}\"", ref, test);
}
int main()