| 1 | use PennMUSH; |
|---|
| 2 | use MUSHConnection; |
|---|
| 3 | use TestHarness; |
|---|
| 4 | |
|---|
| 5 | $mush = PennMUSH->new(); |
|---|
| 6 | $god = $mush->loginGod(); |
|---|
| 7 | |
|---|
| 8 | test('abs.1', $god, 'think abs(-1)', '1'); |
|---|
| 9 | test('abs.2', $god, 'think abs(-1.5)', '1.5'); |
|---|
| 10 | test('abs.3', $god, 'think abs(1)', '1'); |
|---|
| 11 | test('abs.4', $god, 'think abs(0)', '0'); |
|---|
| 12 | test('abs.5', $god, 'think abs(-0)', '0'); |
|---|
| 13 | test('abs.6', $god, 'think abs(99999999999)', '99999999999'); |
|---|
| 14 | test('abs.7', $god, 'think abs(-99999999999)', '99999999999'); |
|---|
| 15 | test('trig.1',$god, 'think cos(90,d)', '^-?0\s*$'); |
|---|
| 16 | test('trig.2',$god, 'think cos(pi(),r)', '^-1\s*$'); |
|---|
| 17 | test('trig.3',$god, 'think cos(pi())', '^-1\s*$'); |
|---|
| 18 | test('trig.4',$god, 'think acos(cos(90,d),d)', '^90\s*$'); |
|---|
| 19 | test('trig.5',$god, 'think acos(cos(1,r))', '^1\s*$'); |
|---|
| 20 | test('trig.6',$god, 'think acos(cos(1,r),r)', '^1\s*$'); |
|---|
| 21 | test('trig.7',$god, 'think sin(90,d)', '^1\s*$'); |
|---|
| 22 | test('trig.8',$god, 'think sin(pi(),r)', '^-?0\s*$'); |
|---|
| 23 | test('trig.9',$god, 'think sin(pi())', '^-?0\s*$'); |
|---|
| 24 | test('trig.10',$god, 'think asin(sin(90,d),d)', '^90\s*$'); |
|---|
| 25 | test('trig.11',$god, 'think asin(sin(1,r))', '^1\s*$'); |
|---|
| 26 | test('trig.12',$god, 'think asin(sin(1,r),r)', '^1\s*$'); |
|---|
| 27 | test('trig.13',$god, 'think tan(45,d)', '^1\s*$'); |
|---|
| 28 | test('trig.14',$god, 'think tan(pi(),r)', '^-?0\s*$'); |
|---|
| 29 | test('trig.15',$god, 'think tan(pi())', '^-?0\s*$'); |
|---|
| 30 | test('trig.16',$god, 'think atan(tan(45,d),d)', '^45\s*$'); |
|---|
| 31 | test('trig.17',$god, 'think atan(tan(1,r))', '^1\s*$'); |
|---|
| 32 | test('trig.18',$god, 'think atan(tan(1,r),r)', '^1\s*$'); |
|---|
| 33 | test('trig.19',$god, 'think ctu(90,d,r)', '^1.570\d*\s*$'); |
|---|
| 34 | test('trig.20',$god, 'think ctu(pi(),r,d)','^180(\.00\d*)?\s*$'); |
|---|