diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-08-28 12:32:58 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-08-28 12:32:58 +0000 |
commit | 95686fa898e62c57529a649758e7f735d851c00d (patch) | |
tree | 72bba18dbe9dedefdfdf9226ea988fdf11d96926 /lldb/packages/Python/lldbsuite | |
parent | 05e2e290c046bd67547be385e3e51b6d759b50af (diff) | |
download | bcm5719-llvm-95686fa898e62c57529a649758e7f735d851c00d.tar.gz bcm5719-llvm-95686fa898e62c57529a649758e7f735d851c00d.zip |
[lldb][NFC] Actually run all expects in lang/cpp/operators
Apparently inline tests stop running anything after an empty line
behind an self.expect, which is a very good approach that could
never cause people to write tests that never run.
This patch removes all the empty lines so that all this test
is actually run. Also fixes the broken expects that only passed
because they weren't run before.
llvm-svn: 370195
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp b/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp index 52442b4d6e6..c909d1337be 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp @@ -43,8 +43,8 @@ struct C { int operator>=(int) { return 87; } int operator>>=(int) { return 88; } - int operator[](int) { return 91; } - int operator()(int) { return 92; } + int operator()(int) { return 91; } + int operator[](int) { return 92; } operator int() { return 11; } operator long() { return 12; } @@ -106,12 +106,10 @@ int main(int argc, char **argv) { //% self.expect("expr c += 42", endstr=" 42\n") //% self.expect("expr c++", endstr=" 123\n") //% self.expect("expr ++c", endstr=" 1234\n") - //% self.expect("expr c - 34", endstr=" 34\n") //% self.expect("expr c -= 32", endstr=" 32\n") - //% self.expect("expr c--", endstr=" 321\n") - //% self.expect("expr --c", endstr=" 4321\n") - + //% self.expect("expr c--", endstr=" 4321\n") + //% self.expect("expr --c", endstr=" 321\n") //% self.expect("expr c * 3", endstr=" 51\n") //% self.expect("expr c *= 3", endstr=" 52\n") //% self.expect("expr c % 3", endstr=" 53\n") @@ -120,20 +118,17 @@ int main(int argc, char **argv) { //% self.expect("expr c /= 3", endstr=" 56\n") //% self.expect("expr c ^ 3", endstr=" 57\n") //% self.expect("expr c ^= 3", endstr=" 58\n") - //% self.expect("expr c | 3", endstr=" 61\n") //% self.expect("expr c |= 3", endstr=" 62\n") //% self.expect("expr c || 3", endstr=" 63\n") //% self.expect("expr c & 3", endstr=" 64\n") //% self.expect("expr c &= 3", endstr=" 65\n") //% self.expect("expr c && 3", endstr=" 66\n") - //% self.expect("expr ~c", endstr=" 71\n") //% self.expect("expr !c", endstr=" 72\n") //% self.expect("expr c!=1", endstr=" 73\n") //% self.expect("expr c=1", endstr=" 74\n") //% self.expect("expr c==1", endstr=" 75\n") - //% self.expect("expr c<1", endstr=" 81\n") //% self.expect("expr c<<1", endstr=" 82\n") //% self.expect("expr c<=1", endstr=" 83\n") @@ -142,10 +137,9 @@ int main(int argc, char **argv) { //% self.expect("expr c>>1", endstr=" 86\n") //% self.expect("expr c>=1", endstr=" 87\n") //% self.expect("expr c>>=1", endstr=" 88\n") - //% self.expect("expr c(1)", endstr=" 91\n") //% self.expect("expr c[1]", endstr=" 92\n") - //% self.expect("expr static_cast<int>", endstr=" 11\n") - //% self.expect("expr static_cast<long>", endstr=" 12\n") + //% self.expect("expr static_cast<int>(c)", endstr=" 11\n") + //% self.expect("expr static_cast<long>(c)", endstr=" 12\n") return 0; } |