aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormax99x <max99x@gmail.com>2011-06-26 00:34:58 +0300
committermax99x <max99x@gmail.com>2011-06-26 00:34:58 +0300
commit30c26439216b6f07848ee3611412671fe84cd19a (patch)
tree1b17127a4fd00eb0aff9ba1058b6638650facbc9 /tests
parentb7cd8aad767e9cb4b0555a60c489966df8dc9405 (diff)
parent019267ac61bdbbf9f4ed340887687b7a2b9312bb (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'tests')
-rw-r--r--tests/runner.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 59062302..4215bfea 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -1097,6 +1097,21 @@ if 'benchmark' not in sys.argv:
'''
self.do_test(src, '*26,26,90,90,26,90*\n*1,0,0,1*\n*goodbye!*')
+ def test_mathfuncptr(self):
+ src = '''
+ #include <math.h>
+ #include <stdio.h>
+
+ int
+ main(void) {
+ float (*fn)(float) = &sqrtf;
+ float (*fn2)(float) = &fabsf;
+ printf("fn2(-5) = %d, fn(10) = %f\\n", (int)fn2(-5), fn(10));
+ return 0;
+ }
+ '''
+ self.do_test(src, 'fn2(-5) = 5, fn(10) = 3.16')
+
def test_emptyclass(self):
src = '''
#include <stdio.h>