Skip to content

Commit f23faf8

Browse files
authored
Merge pull request #2 from Teemperor/MissingDependency
[lldb][NFC] Actually test which method we call in TestCallOverriddenMethod
2 parents a53a298 + 4be8e6b commit f23faf8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test(self):
4141

4242
# Test call to method in base class (this should always work as the base
4343
# class method is never an override).
44-
self.expect("expr b->foo()")
44+
self.expect("expr b->foo()", substrs=["2"])
4545

4646
# Test call to overridden method in derived class (this will fail if the
4747
# overrides table is not correctly set up, as Derived::foo will be assigned

lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/main.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
class Base {
22
public:
33
virtual ~Base() {}
4-
virtual void foo() {}
4+
virtual int foo() { return 1; }
55
};
66

77
class Derived : public Base {
88
public:
9-
virtual void foo() {}
9+
virtual int foo() { return 2; }
1010
};
1111

1212
int main() {

0 commit comments

Comments
 (0)