[libcxx-commits] [libcxx] 4d8db4a - [libc++] Fix GDB pretty printer test on 32 bit targets
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Nov 11 08:09:42 PST 2021
Author: Louis Dionne
Date: 2021-11-11T11:09:36-05:00
New Revision: 4d8db4a9970ec8cfc002f2a860df12c0c8c511bc
URL: https://github.com/llvm/llvm-project/commit/4d8db4a9970ec8cfc002f2a860df12c0c8c511bc
DIFF: https://github.com/llvm/llvm-project/commit/4d8db4a9970ec8cfc002f2a860df12c0c8c511bc.diff
LOG: [libc++] Fix GDB pretty printer test on 32 bit targets
On 32 bit targets, size_t is unsigned int, not unsigned long, so
std::bitset's template argument gets printed with a `u` suffix,
not `ul`.
Added:
Modified:
libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp b/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
index 2c53bd1d11078..42d8897903489 100644
--- a/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
+++ b/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
@@ -244,14 +244,14 @@ void unique_ptr_test() {
void bitset_test() {
std::bitset<258> i_am_empty(0);
- ComparePrettyPrintToRegex(i_am_empty, "std::bitset<258(ul)?>");
+ ComparePrettyPrintToRegex(i_am_empty, "std::bitset<258(u|ul)?>");
std::bitset<0> very_empty;
- ComparePrettyPrintToRegex(very_empty, "std::bitset<0(ul)?>");
+ ComparePrettyPrintToRegex(very_empty, "std::bitset<0(u|ul)?>");
std::bitset<15> b_000001111111100(1020);
ComparePrettyPrintToRegex(b_000001111111100,
- R"(std::bitset<15(ul)?> = {\[2\] = 1, \[3\] = 1, \[4\] = 1, \[5\] = 1, \[6\] = 1, )"
+ R"(std::bitset<15(u|ul)?> = {\[2\] = 1, \[3\] = 1, \[4\] = 1, \[5\] = 1, \[6\] = 1, )"
R"(\[7\] = 1, \[8\] = 1, \[9\] = 1})");
std::bitset<258> b_0_129_132(0);
@@ -259,7 +259,7 @@ void bitset_test() {
b_0_129_132[129] = true;
b_0_129_132[132] = true;
ComparePrettyPrintToRegex(b_0_129_132,
- R"(std::bitset<258(ul)?> = {\[0\] = 1, \[129\] = 1, \[132\] = 1})");
+ R"(std::bitset<258(u|ul)?> = {\[0\] = 1, \[129\] = 1, \[132\] = 1})");
}
void list_test() {
More information about the libcxx-commits
mailing list