summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/TestLibCxxModernTypeLookup.py20
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/main.cpp6
3 files changed, 29 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/Makefile
new file mode 100644
index 00000000000..574c53d7cb1
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+USE_LIBCPP := 1
+include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/TestLibCxxModernTypeLookup.py b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/TestLibCxxModernTypeLookup.py
new file mode 100644
index 00000000000..a33c75494ec
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/TestLibCxxModernTypeLookup.py
@@ -0,0 +1,20 @@
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class LibcxxModernTypeLookup(TestBase):
+
+ mydir = TestBase.compute_mydir(__file__)
+
+ @add_test_categories(["libc++"])
+ def test(self):
+ self.build()
+
+ # Activate modern-type-lookup.
+ self.runCmd("settings set target.experimental.use-modern-type-lookup true")
+
+ lldbutil.run_to_source_breakpoint(self,
+ "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+ # Test a few simple expressions that should still work with modern-type-lookup.
+ self.expect("expr pair", substrs=["(std::", "pair<int, long", "= (first = 1, second = 2)"])
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/main.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/main.cpp
new file mode 100644
index 00000000000..6db6160ba62
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/main.cpp
@@ -0,0 +1,6 @@
+#include <utility>
+
+int main(int argc, char **argv) {
+ std::pair<int, long> pair = std::make_pair<int, float>(1, 2L);
+ return pair.first; // Set break point at this line.
+}
OpenPOWER on IntegriCloud