[libc-commits] [PATCH] D140441: [libc] change str to int tests to be templated

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Dec 20 19:41:14 PST 2022


lntue added a comment.

Look like you'll need to update the bazel layout for the tests.  It complains about missing files.



================
Comment at: libc/test/src/stdlib/StrtolTest.h:164-168
+    const char *sign_after = "2+2=4";
+    errno = 0;
+    ASSERT_EQ(func(sign_after, &str_end, 10), ReturnT(2));
+    ASSERT_EQ(errno, 0);
+    EXPECT_EQ(str_end - sign_after, ptrdiff_t(1));
----------------
This pattern is repeated a lot in this test.  Maybe you can factor it to another method or macro then?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140441



More information about the libc-commits mailing list