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

Alex Brachet via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Jan 29 15:56:32 PST 2020


abrachet added inline comments.


================
Comment at: libc/utils/UnitTest/Test.h:91
+                       const char *File, unsigned long Line) {
+    return Val;
+  }
----------------
This doesn't call `internal::test` and won't give an error message.


================
Comment at: libc/utils/UnitTest/Test.h:196-197
+
+#define EXPECT_FALSE(VAL)                                                      \
+  __llvm_libc::testing::Test::testTrue(Ctx, !(VAL), #VAL, __FILE__, __LINE__)
+
----------------
Will this give an error message that makes sense? I think it will do something like "expected true but was true"


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