llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) <details> <summary>Changes</summary> … directory This just moves the test from `libcxx` to `generic`. There are currently no `std::unordered_map::iterator` formatters for libstdc++ so I didn't add a test-case for it. Split out from https://github.com/llvm/llvm-project/pull/146740 --- Full diff: https://github.com/llvm/llvm-project/pull/147703.diff 3 Files Affected: - (renamed) lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/Makefile (-3) - (renamed) lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/TestDataFormatterStdUnorderedMap.py (+17-10) - (renamed) lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/main.cpp () ``````````diff diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/Makefile similarity index 54% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/Makefile index 564cbada74e08..99998b20bcb05 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/Makefile +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/Makefile @@ -1,6 +1,3 @@ CXX_SOURCES := main.cpp -USE_LIBCPP := 1 - -CXXFLAGS_EXTRAS := -O0 include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/TestDataFormatterLibccUnorderedMap.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/TestDataFormatterStdUnorderedMap.py similarity index 92% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/TestDataFormatterLibccUnorderedMap.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/TestDataFormatterStdUnorderedMap.py index a338e3c12598e..d2382373f4810 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/TestDataFormatterLibccUnorderedMap.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/TestDataFormatterStdUnorderedMap.py @@ -8,7 +8,7 @@ from lldbsuite.test import lldbutil -class LibcxxUnorderedMapDataFormatterTestCase(TestBase): +class StdUnorderedMapDataFormatterTestCase(TestBase): def check_ptr_or_ref(self, var_name: str): var = self.frame().FindVariable(var_name) self.assertTrue(var) @@ -32,12 +32,10 @@ def check_ptr_ptr(self, var_name: str): self.assertEqual(pair.GetChildAtIndex(0).summary, '"Hello"') self.assertEqual(pair.GetChildAtIndex(1).summary, '"World"') - @add_test_categories(["libc++"]) - def test_iterator_formatters(self): + def do_test(self): """Test that std::unordered_map related structures are formatted correctly when printed. Currently only tests format of std::unordered_map iterators. """ - self.build() (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( self, "Break here", lldb.SBFileSpec("main.cpp", False) ) @@ -105,13 +103,12 @@ def test_iterator_formatters(self): type="const StringMapT *const &", ) - @expectedFailureAll( - bugnumber="https://github.com/llvm/llvm-project/issues/146040", - compiler="clang", - compiler_version=["<", "21"], - ) @add_test_categories(["libc++"]) - def test_ptr_formatters(self): + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP": 1}) + self.do_test() + + def do_test_ptr(self): """ Test that pointers to std::unordered_map are formatted correctly. """ @@ -127,3 +124,13 @@ def test_ptr_formatters(self): self.check_ptr_ptr("ptr4") self.check_ptr_ptr("ptr5") self.check_ptr_ptr("ptr6") + + @expectedFailureAll( + bugnumber="https://github.com/llvm/llvm-project/issues/146040", + compiler="clang", + compiler_version=["<", "21"], + ) + @add_test_categories(["libc++"]) + def test_ptr_libcxx(self): + self.build(dictionary={"USE_LIBCPP": 1}) + self.do_test_ptr() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/main.cpp `````````` </details> https://github.com/llvm/llvm-project/pull/147703 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits