[libc-commits] [libc] [libc][test][stdbit] fix has_single_bit test names (PR #83904)

via libc-commits libc-commits at lists.llvm.org
Mon Mar 4 12:35:55 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Nick Desaulniers (nickdesaulniers)

<details>
<summary>Changes</summary>

This was copy+pasted from count_ones without updating the test name completely.


---
Full diff: https://github.com/llvm/llvm-project/pull/83904.diff


5 Files Affected:

- (modified) libc/test/src/stdbit/stdc_has_single_bit_uc_test.cpp (+2-2) 
- (modified) libc/test/src/stdbit/stdc_has_single_bit_ui_test.cpp (+2-2) 
- (modified) libc/test/src/stdbit/stdc_has_single_bit_ul_test.cpp (+2-2) 
- (modified) libc/test/src/stdbit/stdc_has_single_bit_ull_test.cpp (+2-2) 
- (modified) libc/test/src/stdbit/stdc_has_single_bit_us_test.cpp (+2-2) 


``````````diff
diff --git a/libc/test/src/stdbit/stdc_has_single_bit_uc_test.cpp b/libc/test/src/stdbit/stdc_has_single_bit_uc_test.cpp
index 6212b1ec765a5d..1bc189cf0b665f 100644
--- a/libc/test/src/stdbit/stdc_has_single_bit_uc_test.cpp
+++ b/libc/test/src/stdbit/stdc_has_single_bit_uc_test.cpp
@@ -10,11 +10,11 @@
 #include "src/stdbit/stdc_has_single_bit_uc.h"
 #include "test/UnitTest/Test.h"
 
-TEST(LlvmLibcStdcCountOnesUcTest, Zero) {
+TEST(LlvmLibcStdcHasSingleBitUcTest, Zero) {
   EXPECT_EQ(LIBC_NAMESPACE::stdc_has_single_bit_uc(0U), false);
 }
 
-TEST(LlvmLibcStdcCountOnesUcTest, OneHot) {
+TEST(LlvmLibcStdcHasSingleBitUcTest, OneHot) {
   for (unsigned i = 0U; i != UCHAR_WIDTH; ++i)
     EXPECT_EQ(LIBC_NAMESPACE::stdc_has_single_bit_uc(1U << i), true);
 }
diff --git a/libc/test/src/stdbit/stdc_has_single_bit_ui_test.cpp b/libc/test/src/stdbit/stdc_has_single_bit_ui_test.cpp
index 2e00507aa0258c..c0b6abcf8fdc15 100644
--- a/libc/test/src/stdbit/stdc_has_single_bit_ui_test.cpp
+++ b/libc/test/src/stdbit/stdc_has_single_bit_ui_test.cpp
@@ -10,11 +10,11 @@
 #include "src/stdbit/stdc_has_single_bit_ui.h"
 #include "test/UnitTest/Test.h"
 
-TEST(LlvmLibcStdcCountOnesUiTest, Zero) {
+TEST(LlvmLibcStdcHasSingleBitUiTest, Zero) {
   EXPECT_EQ(LIBC_NAMESPACE::stdc_has_single_bit_ui(0U), false);
 }
 
-TEST(LlvmLibcStdcCountOnesUiTest, OneHot) {
+TEST(LlvmLibcStdcHasSingleBitUiTest, OneHot) {
   for (unsigned i = 0U; i != UINT_WIDTH; ++i)
     EXPECT_EQ(LIBC_NAMESPACE::stdc_has_single_bit_ui(1U << i), true);
 }
diff --git a/libc/test/src/stdbit/stdc_has_single_bit_ul_test.cpp b/libc/test/src/stdbit/stdc_has_single_bit_ul_test.cpp
index 8c0178998bbec1..4c29fff748e98d 100644
--- a/libc/test/src/stdbit/stdc_has_single_bit_ul_test.cpp
+++ b/libc/test/src/stdbit/stdc_has_single_bit_ul_test.cpp
@@ -10,11 +10,11 @@
 #include "src/stdbit/stdc_has_single_bit_ul.h"
 #include "test/UnitTest/Test.h"
 
-TEST(LlvmLibcStdcCountOnesUlTest, Zero) {
+TEST(LlvmLibcStdcHasSingleBitUlTest, Zero) {
   EXPECT_EQ(LIBC_NAMESPACE::stdc_has_single_bit_ul(0U), false);
 }
 
-TEST(LlvmLibcStdcCountOnesUlTest, OneHot) {
+TEST(LlvmLibcStdcHasSingleBitUlTest, OneHot) {
   for (unsigned i = 0U; i != ULONG_WIDTH; ++i)
     EXPECT_EQ(LIBC_NAMESPACE::stdc_has_single_bit_ul(1UL << i), true);
 }
diff --git a/libc/test/src/stdbit/stdc_has_single_bit_ull_test.cpp b/libc/test/src/stdbit/stdc_has_single_bit_ull_test.cpp
index 1d9f976b6d6338..59716468cc7080 100644
--- a/libc/test/src/stdbit/stdc_has_single_bit_ull_test.cpp
+++ b/libc/test/src/stdbit/stdc_has_single_bit_ull_test.cpp
@@ -10,11 +10,11 @@
 #include "src/stdbit/stdc_has_single_bit_ull.h"
 #include "test/UnitTest/Test.h"
 
-TEST(LlvmLibcStdcCountOnesUllTest, Zero) {
+TEST(LlvmLibcStdcHasSingleBitUllTest, Zero) {
   EXPECT_EQ(LIBC_NAMESPACE::stdc_has_single_bit_ull(0U), false);
 }
 
-TEST(LlvmLibcStdcCountOnesUllTest, OneHot) {
+TEST(LlvmLibcStdcHasSingleBitUllTest, OneHot) {
   for (unsigned i = 0U; i != ULLONG_WIDTH; ++i)
     EXPECT_EQ(LIBC_NAMESPACE::stdc_has_single_bit_ull(1ULL << i), true);
 }
diff --git a/libc/test/src/stdbit/stdc_has_single_bit_us_test.cpp b/libc/test/src/stdbit/stdc_has_single_bit_us_test.cpp
index 52c4de88104459..a038f6fac01232 100644
--- a/libc/test/src/stdbit/stdc_has_single_bit_us_test.cpp
+++ b/libc/test/src/stdbit/stdc_has_single_bit_us_test.cpp
@@ -10,11 +10,11 @@
 #include "src/stdbit/stdc_has_single_bit_us.h"
 #include "test/UnitTest/Test.h"
 
-TEST(LlvmLibcStdcCountOnesUsTest, Zero) {
+TEST(LlvmLibcStdcHasSingleBitUsTest, Zero) {
   EXPECT_EQ(LIBC_NAMESPACE::stdc_has_single_bit_us(0U), false);
 }
 
-TEST(LlvmLibcStdcCountOnesUsTest, OneHot) {
+TEST(LlvmLibcStdcHasSingleBitUsTest, OneHot) {
   for (unsigned i = 0U; i != USHRT_WIDTH; ++i)
     EXPECT_EQ(LIBC_NAMESPACE::stdc_has_single_bit_us(1U << i), true);
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/83904


More information about the libc-commits mailing list