forked from OSchip/llvm-project
Change the patterns to include the prefix '= ' so we don't pass errantly.
Looking at a sometimes-passing test case on a platform where random values were being returned - sometimes the expected digit ('1' or '2') would be included in the random returned value. Add a prefix to reduce the likelihood of this a bit.
This commit is contained in:
parent
08d17cb065
commit
450073c639
|
@ -40,10 +40,10 @@ class ExprCommandCallOverriddenMethod(TestBase):
|
|||
|
||||
# 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()", substrs=["2"])
|
||||
self.expect("expr b->foo()", substrs=["= 2"])
|
||||
|
||||
# Test calling the base class.
|
||||
self.expect("expr realbase.foo()", substrs=["1"])
|
||||
self.expect("expr realbase.foo()", substrs=["= 1"])
|
||||
|
||||
@skipIfLinux # Returns wrong result code on some platforms.
|
||||
def test_call_on_derived(self):
|
||||
|
@ -61,7 +61,7 @@ class ExprCommandCallOverriddenMethod(TestBase):
|
|||
# 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()", substrs=["2"])
|
||||
self.expect("expr d.foo()", substrs=["= 2"])
|
||||
|
||||
@skipIf(oslist=["linux"], archs=["aarch64"])
|
||||
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr43707")
|
||||
|
@ -78,5 +78,5 @@ class ExprCommandCallOverriddenMethod(TestBase):
|
|||
self.runCmd("run", RUN_SUCCEEDED)
|
||||
|
||||
# Test with locally constructed instances.
|
||||
self.expect("expr Base().foo()", substrs=["1"])
|
||||
self.expect("expr Derived().foo()", substrs=["2"])
|
||||
self.expect("expr Base().foo()", substrs=["= 1"])
|
||||
self.expect("expr Derived().foo()", substrs=["= 2"])
|
||||
|
|
Loading…
Reference in New Issue