summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-09-01 09:12:37 +0000
committerRaphael Isemann <teemperor@gmail.com>2019-09-01 09:12:37 +0000
commit29872606d220420d53fde7cc5e3bea15f8da62e7 (patch)
tree47d7a82ccea48a6dd10a2d8ecb6b3c3127724131 /lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method
parentadfdcb9c2652aeee585b9005fd6c67be06af8ea9 (diff)
downloadbcm5719-llvm-29872606d220420d53fde7cc5e3bea15f8da62e7.tar.gz
bcm5719-llvm-29872606d220420d53fde7cc5e3bea15f8da62e7.zip
[lldb] Restructure test folders to match LLDB command hierarchy
Summary: As discussed on lldb-dev, this patch moves some LLDB tests into a hierarchy that more closely resembles the commands we use in the LLDB interpreter. This patch should only move tests that use the command interpreter and shouldn't touch any tests that primarily test the SB API. Reviewers: #lldb, jfb, JDevlieghere Reviewed By: #lldb, JDevlieghere Subscribers: dexonsmith, arphaman, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67033 llvm-svn: 370605
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method')
-rw-r--r--lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/Makefile8
-rw-r--r--lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/TestCallOverriddenMethod.py49
-rw-r--r--lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/main.cpp16
3 files changed, 0 insertions, 73 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/Makefile
deleted file mode 100644
index 9d4f3b7f141..00000000000
--- a/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
-
-clean::
- rm -rf $(wildcard *.o *.d *.dSYM)
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/TestCallOverriddenMethod.py b/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/TestCallOverriddenMethod.py
deleted file mode 100644
index 1e61aa9f46e..00000000000
--- a/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/TestCallOverriddenMethod.py
+++ /dev/null
@@ -1,49 +0,0 @@
-"""
-Test calling an overriden method.
-
-Note:
- This verifies that LLDB is correctly building the method overrides table.
- If this table is not built correctly then calls to overridden methods in
- derived classes may generate references to non-existant vtable entries,
- as the compiler treats the overridden method as a totally new virtual
- method definition.
- <rdar://problem/14205774>
-
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class ExprCommandCallOverriddenMethod(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break for main.c.
- self.line = line_number('main.cpp', '// Set breakpoint here')
-
- @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
- def test(self):
- """Test calls to overridden methods in derived classes."""
- self.build()
-
- # Set breakpoint in main and run exe
- self.runCmd("file " + self.getBuildArtifact("a.out"),
- CURRENT_EXECUTABLE_SET)
- lldbutil.run_break_set_by_file_and_line(
- self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # Test call to method in base class (this should always work as the base
- # class method is never an override).
- self.expect("expr b->foo()")
-
- # Test call to overridden method in derived class (this will fail if the
- # overrides table is not correctly set up, as Derived::foo will be assigned
- # a vtable entry that does not exist in the compiled program).
- self.expect("expr d.foo()")
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/main.cpp
deleted file mode 100644
index 54ae705d297..00000000000
--- a/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/main.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-class Base {
-public:
- virtual ~Base() {}
- virtual void foo() {}
-};
-
-class Derived : public Base {
-public:
- virtual void foo() {}
-};
-
-int main() {
- Derived d;
- Base *b = &d;
- return 0; // Set breakpoint here
-}
OpenPOWER on IntegriCloud