[libc-commits] [PATCH] D73668: [libc] Add [EXPECT|ASSERT]_[TRUE|FALSE] unittest macros.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jan 30 12:10:23 PST 2020


sivachandra marked an inline comment as done.
sivachandra added inline comments.


================
Comment at: libc/utils/UnitTest/Test.h:180-181
+#define EXPECT_TRUE(VAL)                                                       \
+  __llvm_libc::testing::Test::test(Ctx, __llvm_libc::testing::Cond_EQ, (VAL),  \
+                                   true, #VAL, "true", __FILE__, __LINE__)
+
----------------
abrachet wrote:
> Could we shorten this to `EXPECT_EQ(VAL, true)`?
Indeed!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73668





More information about the libc-commits mailing list