[libc-commits] [libc] fdee2d7 - [libc] Fix too long number in strtoul_test

Michael Jones via libc-commits libc-commits at lists.llvm.org
Tue Aug 24 13:17:14 PDT 2021


Author: Michael Jones
Date: 2021-08-24T20:17:09Z
New Revision: fdee2d768d5f1a242952f5da2a7e2b13a9ecabd5

URL: https://github.com/llvm/llvm-project/commit/fdee2d768d5f1a242952f5da2a7e2b13a9ecabd5
DIFF: https://github.com/llvm/llvm-project/commit/fdee2d768d5f1a242952f5da2a7e2b13a9ecabd5.diff

LOG: [libc] Fix too long number in strtoul_test

I think this is the last windows type conversion fix, the rest of the
build seems to be okay.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D108659

Added: 
    

Modified: 
    libc/test/src/stdlib/strtoul_test.cpp

Removed: 
    


################################################################################
diff  --git a/libc/test/src/stdlib/strtoul_test.cpp b/libc/test/src/stdlib/strtoul_test.cpp
index 0ae6594f2816..e59ef2ebe8ee 100644
--- a/libc/test/src/stdlib/strtoul_test.cpp
+++ b/libc/test/src/stdlib/strtoul_test.cpp
@@ -45,11 +45,11 @@ TEST(LlvmLibcStrToULTest, CleanBaseTenDecode) {
   ASSERT_EQ(errno, 0);
   EXPECT_EQ(str_end - negative, ptr
diff _t(4));
 
-  const char *big_number = "123456789012345";
+  const char *big_number = "1234567890";
   errno = 0;
-  ASSERT_EQ(__llvm_libc::strtoul(big_number, &str_end, 10), 123456789012345ul);
+  ASSERT_EQ(__llvm_libc::strtoul(big_number, &str_end, 10), 1234567890ul);
   ASSERT_EQ(errno, 0);
-  EXPECT_EQ(str_end - big_number, ptr
diff _t(15));
+  EXPECT_EQ(str_end - big_number, ptr
diff _t(10));
 
   const char *too_big_number = "123456789012345678901";
   errno = 0;


        


More information about the libc-commits mailing list