root/1.8.3/tags/p5rc1/test/testmath.pl

Revision 1078, 1.4 KB (checked in by shawnw, 17 months ago)

#7443: regression test rewrite

Line 
1run tests:
2test('abs.1', $god, 'think abs(-1)', '1');
3test('abs.2', $god, 'think abs(-1.5)', '1.5');
4test('abs.3', $god, 'think abs(1)', '1');
5test('abs.4', $god, 'think abs(0)', '0');
6test('abs.5', $god, 'think abs(-0)', '0');
7test('abs.6', $god, 'think abs(99999999999)', '99999999999');
8test('abs.7', $god, 'think abs(-99999999999)', '99999999999');
9test('trig.1',$god, 'think cos(90,d)', '^-?0\s*$');
10test('trig.2',$god, 'think cos(pi(),r)', '^-1\s*$');
11test('trig.3',$god, 'think cos(pi())', '^-1\s*$');
12test('trig.4',$god, 'think acos(cos(90,d),d)', '^90\s*$');
13test('trig.5',$god, 'think acos(cos(1,r))', '^1\s*$');
14test('trig.6',$god, 'think acos(cos(1,r),r)', '^1\s*$');
15test('trig.7',$god, 'think sin(90,d)', '^1\s*$');
16test('trig.8',$god, 'think sin(pi(),r)', '^-?0\s*$');
17test('trig.9',$god, 'think sin(pi())', '^-?0\s*$');
18test('trig.10',$god, 'think asin(sin(90,d),d)', '^90\s*$');
19test('trig.11',$god, 'think asin(sin(1,r))', '^1\s*$');
20test('trig.12',$god, 'think asin(sin(1,r),r)', '^1\s*$');
21test('trig.13',$god, 'think tan(45,d)', '^1\s*$');
22test('trig.14',$god, 'think tan(pi(),r)', '^-?0\s*$');
23test('trig.15',$god, 'think tan(pi())', '^-?0\s*$');
24test('trig.16',$god, 'think atan(tan(45,d),d)', '^45\s*$');
25test('trig.17',$god, 'think atan(tan(1,r))', '^1\s*$');
26test('trig.18',$god, 'think atan(tan(1,r),r)', '^1\s*$');
27test('trig.19',$god, 'think ctu(90,d,r)', '^1.570\d*\s*$');
28test('trig.20',$god, 'think ctu(pi(),r,d)','^180(\.00\d*)?\s*$');
Note: See TracBrowser for help on using the browser.