aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authoralon@honor <none@none>2010-10-24 11:38:08 -0700
committeralon@honor <none@none>2010-10-24 11:38:08 -0700
commitfa7440b389910fefe7b3ea713a21b8a6b44daa6f (patch)
tree995a000499b75bef6a72bc2d97d778cfc6abb373 /tests/runner.py
parent6cc0726f3cac4473eb0ac8bfadaf429a14d472c4 (diff)
add nonvirtual part to polymorph test; fails in clang
Diffstat (limited to 'tests/runner.py')
-rw-r--r--tests/runner.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 879f3cbc..c87ac416 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -490,15 +490,28 @@ if 'benchmark' not in sys.argv:
int getit() { return 74; }
int implme() { return 1012; }
};
+
+ struct Other {
+ int one() { return 11; }
+ int two() { return 22; }
+ };
+
int main()
{
Parent *x = new Parent();
Parent *y = new Child();
printf("*%d,%d,%d,%d*\\n", x->getit(), y->getit(), x->implme(), y->implme());
+
+ Other *o = new Other;
+ int (Other::*Ls)() = &Other::one;
+ printf("*%d*\\n", (o->*(Ls))());
+ Ls = &Other::two;
+ printf("*%d*\\n", (o->*(Ls))());
+
return 0;
}
'''
- self.do_test(src, '*11,74,32,1012*')
+ self.do_test(src, '*11,74,32,1012*\n*11*\n*22*')
def test_funcptr(self):
src = '''