diff options
| author | Michael Buch <michaelbuch12@gmail.com> | 2025-07-08 09:01:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-08 09:01:10 +0100 |
| commit | fd997d86f060c8110a6b5151e8f21c4e4e17ba4a (patch) | |
| tree | 4b1077bf9153c8eaefd3a255d87c190d11dfd5ac /lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp | |
| parent | 2e5776130b1da8d2d553b62a87c6bf6ace07e2f8 (diff) | |
[lldb][test] Combine libstdc++ and libc++ tuple tests into generic test (#147139)
This combines the libc++ and libstdc++ test cases. The main difference
was that the libstdcpp tests had some tuple indexing tests that libc++
didn't have.
The libstdc++ formatter didn't support size summaries for std::tuple. So
I added a `ContainerSizeSummaryProvider` for it (like we do for libc++).
Additionally, the synthetic frontend would only apply to non-empty
tuples, so I adjusted the regex to match empty ones too. We do this for
libc++ already.
Split out from https://github.com/llvm/llvm-project/pull/146740
Diffstat (limited to 'lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp')
3 files changed, 0 insertions, 61 deletions
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/Makefile deleted file mode 100644 index bf8e6b8703f3..000000000000 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -CXX_SOURCES := main.cpp - -USE_LIBSTDCPP := 1 - -include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py deleted file mode 100644 index 1433b5bc1acb..000000000000 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py +++ /dev/null @@ -1,47 +0,0 @@ -""" -Test lldb data formatter subsystem. -""" - - -import lldb -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - - -class StdTupleDataFormatterTestCase(TestBase): - @add_test_categories(["libstdcxx"]) - @expectedFailureAll(bugnumber="llvm.org/pr50861", compiler="gcc") - def test_with_run_command(self): - self.build() - self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) - - lldbutil.run_break_set_by_source_regexp(self, "Set break point at this line.") - self.runCmd("run", RUN_SUCCEEDED) - - # The stop reason of the thread should be breakpoint. - self.expect( - "thread list", - STOPPED_DUE_TO_BREAKPOINT, - substrs=["stopped", "stop reason = breakpoint"], - ) - - frame = self.frame() - self.assertTrue(frame.IsValid()) - - self.expect("frame variable ti", substrs=["[0] = 1"]) - self.expect("frame variable ts", substrs=['[0] = "foobar"']) - self.expect("frame variable tt", substrs=["[0] = 1", '[1] = "baz"', "[2] = 2"]) - - self.assertEqual(1, frame.GetValueForVariablePath("ti[0]").GetValueAsUnsigned()) - self.assertFalse(frame.GetValueForVariablePath("ti[1]").IsValid()) - - self.assertEqual( - '"foobar"', frame.GetValueForVariablePath("ts[0]").GetSummary() - ) - self.assertFalse(frame.GetValueForVariablePath("ts[1]").IsValid()) - - self.assertEqual(1, frame.GetValueForVariablePath("tt[0]").GetValueAsUnsigned()) - self.assertEqual('"baz"', frame.GetValueForVariablePath("tt[1]").GetSummary()) - self.assertEqual(2, frame.GetValueForVariablePath("tt[2]").GetValueAsUnsigned()) - self.assertFalse(frame.GetValueForVariablePath("tt[3]").IsValid()) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/main.cpp deleted file mode 100644 index 7247742ee6bb..000000000000 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/main.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include <memory> -#include <string> - -int main() { - std::tuple<int> ti{1}; - std::tuple<std::string> ts{"foobar"}; - std::tuple<int, std::string, int> tt{1, "baz", 2}; - return 0; // Set break point at this line. -} |
