Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 38 lines (25 sloc) 1.108 kb
58135b3 [t/spec] changed 'use v6-alpha;' to 'use v6;'
moritz authored
1 use v6;
54712b5 [t/spec] Moved abs test script under t/spec/S29-num
cosimo authored
2 use Test;
9e1a6c4 @colomon Clean up tests (moritz++) and todo one.
colomon authored
3 plan 49;
54712b5 [t/spec] Moved abs test script under t/spec/S29-num
cosimo authored
4
b8d99dd [t/spec] fix more smartlinks
moritz authored
5 # L<S32::Numeric/Numeric/"=item abs">
54712b5 [t/spec] Moved abs test script under t/spec/S29-num
cosimo authored
6
626a59c [rakudo] add directives to S29-num/ and convert pod to pod6
particle authored
7 =begin pod
54712b5 [t/spec] Moved abs test script under t/spec/S29-num
cosimo authored
8
9 Basic tests for the abs() builtin
10
626a59c [rakudo] add directives to S29-num/ and convert pod to pod6
particle authored
11 =end pod
54712b5 [t/spec] Moved abs test script under t/spec/S29-num
cosimo authored
12
9e1a6c4 @colomon Clean up tests (moritz++) and todo one.
colomon authored
13 for 0, 0 / 1, 0.0e0, 1, 50, 60.0e0, 99.99 -> $x {
14 is(abs($x), $x, "got the right absolute value for $x");
15 is($x.abs, $x, 'got the right absolute value for $x='~$x);
a7adf32 [t/spec] Remove the 10 abs tests which were tripping up ng, in a fash…
colomon authored
16
9e1a6c4 @colomon Clean up tests (moritz++) and todo one.
colomon authored
17 is (abs($x)).WHAT.gist, $x.WHAT.gist, 'type of abs($x) agrees with type of $x';
18 is $x.abs.WHAT.gist, $x.WHAT.gist, 'type of $x.abs agrees with type of $x';
54712b5 [t/spec] Moved abs test script under t/spec/S29-num
cosimo authored
19 }
a7adf32 [t/spec] Remove the 10 abs tests which were tripping up ng, in a fash…
colomon authored
20
b50b7f1 [t/spec] Test abs for Rats as well, prefer .WHAT to WHAT, and add tes…
colomon authored
21 for -1, -50, -60.0e0, -9999 / 100 {
54712b5 [t/spec] Moved abs test script under t/spec/S29-num
cosimo authored
22 is(abs($_), -$_, "got the right absolute value for $_");
45e7940 [t/spec] Get working with ng.
colomon authored
23 is(.abs, -$_, 'got the right absolute value for $_='~$_);
54712b5 [t/spec] Moved abs test script under t/spec/S29-num
cosimo authored
24
9e1a6c4 @colomon Clean up tests (moritz++) and todo one.
colomon authored
25 is (abs($_)).WHAT.gist, $_.WHAT.gist, 'type of abs($_) agrees with type of $_';
26 is $_.abs.WHAT.gist, $_.WHAT.gist, 'type of $_.abs agrees with type of $_';
54712b5 [t/spec] Moved abs test script under t/spec/S29-num
cosimo authored
27 }
612b6b6 Tests for abs(x) with Inf and NaN
leto authored
28
29 is( abs(NaN), NaN, 'absolute value of NaN is NaN');
30 is( abs(Inf), Inf, 'absolute value of Inf is Inf');
31 is( abs(-Inf), Inf, 'absolute value of -Inf is Inf');
eb1c248 [t/spec] fix a few S32-num smartlinks
moritz authored
32
b50b7f1 [t/spec] Test abs for Rats as well, prefer .WHAT to WHAT, and add tes…
colomon authored
33 is( abs("-10"), 10, 'absolute value of "-10" is 10');
34
9e1a6c4 @colomon Clean up tests (moritz++) and todo one.
colomon authored
35 is( abs(70596).WHAT.gist, 70596.abs.WHAT.gist, 'abs(x).WHAT parses as x.abs.WHAT' );
2407835 [t/spec] Test for RT 70596: parsing of abs(1).WHAT
kyle authored
36
eb1c248 [t/spec] fix a few S32-num smartlinks
moritz authored
37 # vim: ft=perl6
Something went wrong with that request. Please try again.