aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authoralon@honor <none@none>2010-10-21 21:41:43 -0700
committeralon@honor <none@none>2010-10-21 21:41:43 -0700
commitf57cfb99176a2ec61db5b91aeed1f3ff6a719634 (patch)
treefbd8d4b17a077685de21010550396dd5d2160206 /tests/runner.py
parentbeb16b9d956b0434330d6ce1eefd67eec5bae111 (diff)
fixes in parseConst; move getFunctionIndex into Runtime; test for global function pointers
Diffstat (limited to 'tests/runner.py')
-rw-r--r--tests/runner.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 931127c8..7356ad34 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -501,6 +501,10 @@ if 'benchmark' not in sys.argv:
int calc1() { return 26; }
int calc2() { return 90; }
typedef int (*fp_t)();
+
+ fp_t globally1 = calc1;
+ fp_t globally2 = calc2;
+
int main()
{
fp_t fp = calc1;
@@ -509,11 +513,11 @@ if 'benchmark' not in sys.argv:
fp_t fp2 = calc2;
void *vp2 = (void*)fp2;
fp_t fpb2 = (fp_t)vp2;
- printf("*%d,%d,%d,%d*\\n", fp(), fpb(), fp2(), fpb2());
+ printf("*%d,%d,%d,%d,%d,%d*\\n", fp(), fpb(), fp2(), fpb2(), globally1(), globally2());
return 0;
}
'''
- self.do_test(src, '*26,26,90,90*')
+ self.do_test(src, '*26,26,90,90,26,90*')
def test_emptyclass(self):
src = '''