aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormax99x <max99x@gmail.com>2011-07-13 23:25:44 +0300
committermax99x <max99x@gmail.com>2011-07-13 23:25:44 +0300
commit3159de633f092bbd48a4f644d71a8673222714b5 (patch)
treea881041ccd4b7b23065d4bcdabd0c84f4c254d78 /tests
parent9ee300c1906aae24e1a27521c7a0ef5e461efded (diff)
Fixed finite() and isinf(), added tests for it.
Diffstat (limited to 'tests')
-rw-r--r--tests/runner.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py
index ede51756..58f96db4 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -537,11 +537,18 @@ if 'benchmark' not in sys.argv:
#include <cmath>
int main()
{
- printf("*%.2f,%.2f,%f,%f*\\n", M_PI, -M_PI, 1/0.0, -1/0.0);
+ printf("*%.2f,%.2f,%f,%f", M_PI, -M_PI, 1/0.0, -1/0.0);
+ printf(",%d", finite(NAN));
+ printf(",%d", finite(INFINITY));
+ printf(",%d", finite(12.3));
+ printf(",%d", isinf(NAN));
+ printf(",%d", isinf(INFINITY));
+ printf(",%d", isinf(12.3));
+ printf("*\\n");
return 0;
}
'''
- self.do_test(src, '*3.14,-3.14,inf,-inf*')
+ self.do_test(src, '*3.14,-3.14,inf,-inf,0,0,1,0,1,0')
def test_math_hyperbolic(self):
src = open(path_from_root('tests', 'hyperbolic', 'src.c'), 'r').read()