[libc-commits] [PATCH] D84875: [libc] Adds strrchr implementation.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jul 31 13:00:19 PDT 2020


sivachandra added inline comments.


================
Comment at: libc/test/src/string/strrchr_test.cpp:18-19
+  ASSERT_STREQ(__llvm_libc::strrchr(src, 'a'), "abcde");
+  // Source string should not change.
+  ASSERT_STREQ(src, src_copy);
+}
----------------
abrachet wrote:
> This doesn't do anything. You want `ASSERT_STREQ(src, "abcde");` And for the next 3 tests. Also all 4 of these can be consolidated into the same function.
Ah, good catch! I missed it in the `strchr_test` as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84875



More information about the libc-commits mailing list