[lldb][NFC] Extend operator test case with conversion operators

llvm-svn: 370194
This commit is contained in:
Raphael Isemann 2019-08-28 12:14:39 +00:00
parent 9004c077c0
commit 05e2e290c0
1 changed files with 9 additions and 0 deletions

View File

@ -45,6 +45,9 @@ struct C {
int operator[](int) { return 91; }
int operator()(int) { return 92; }
operator int() { return 11; }
operator long() { return 12; }
};
int main(int argc, char **argv) {
@ -93,6 +96,10 @@ int main(int argc, char **argv) {
result += c(1);
result += c[1];
result += static_cast<int>(c);
result += static_cast<long>(c);
//% self.expect("expr c->dummy", endstr=" 2324\n")
//% self.expect("expr c->*2", endstr=" 2\n")
//% self.expect("expr c + 44", endstr=" 44\n")
@ -138,5 +145,7 @@ int main(int argc, char **argv) {
//% 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")
return 0;
}