[libc-commits] [PATCH] D124130: [libc] Add Printf FormatSection Matcher

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Apr 20 15:21:20 PDT 2022


lntue accepted this revision.
lntue added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libc/utils/UnitTest/PrintfMatcher.cpp:71
+
+void display(testutils::StreamWrapper &stream, FormatSection form) {
+  char buffer[40];
----------------
You might want to wrap the template int_to_hex and display function inside an anonymous namespace.


================
Comment at: libc/utils/UnitTest/PrintfMatcher.h:38
+
+#define EXPECT_FORM_EQ(expected, actual)                                       \
+  EXPECT_THAT(actual, __llvm_libc::printf_core::testing::FormatSectionMatcher( \
----------------
Since *form* is also an actual word, it might be better to change these macros to EXPECT/ASSERT_FORMAT_EQ


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124130



More information about the libc-commits mailing list