[libc-commits] [PATCH] D114637: [libc] Optimized version of memmove

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Dec 1 11:08:32 PST 2021


sivachandra added inline comments.


================
Comment at: libc/test/src/string/memmove_test.cpp:14
+#include <cstdio>
+#include <functional>
+
----------------
Including `cstdio` and `functional` from tests is not allowed.


================
Comment at: libc/test/src/string/memmove_test.cpp:53
+      const size_t size = expected.size();
+      Display(
+          size,
----------------
For things like this, you should use a matcher. Look at this for example: https://github.com/llvm/llvm-project/blob/main/libc/utils/UnitTest/FPMatcher.h#L26.

You can probably implement a matcher which can used like this: `EXPECT_MEM_EQ(mem1, mem2, size)`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114637



More information about the libc-commits mailing list