[libc-commits] [PATCH] D84875: [libc] Adds strrchr implementation.
Chris Gyurgyik via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Jul 31 13:12:14 PDT 2020
cgyurgyik 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);
+}
----------------
sivachandra wrote:
> 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.
Yep thanks will fix.
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