[libcxx-commits] [PATCH] D140651: [libc++][format] Adds new test macros.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 10 11:29:55 PST 2023


Mordante marked 9 inline comments as done.
Mordante added inline comments.


================
Comment at: libcxx/test/support/test_validation.h:51
+template <class... Args>
+[[noreturn]] void test_log_error(const char* condition, const char* file, int line, [[maybe_unused]] Args&&... args) {
+  const char* msg = condition ? "Assertion failure: " : "Unconditional failure:";
----------------
ldionne wrote:
> If we dropped the free-form arguments from here and instead expected a string (or a C string), we could drop the dependency on `iostream` and make this much more widely useful in the test suite. It may also become useful for older tests. You'd probably want to define another helper function that will stringify your arguments and you could use that in your tests.
As discussed I've done so. This still needs an additional include to "stringify" the messages.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140651/new/

https://reviews.llvm.org/D140651



More information about the libcxx-commits mailing list