Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add test for NaN,-Inf,Inf on native num arrays
  • Loading branch information
lizmat committed Mar 16, 2015
1 parent 6f15520 commit 591288e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion S09-typed-arrays/native-num.t
Expand Up @@ -5,7 +5,7 @@ if $*KERNEL.bits == 64 {
@num.push: num64;
}

plan @num * 115;
plan @num * 116;

# Basic native num array tests.
for @num -> $T {
Expand Down Expand Up @@ -52,6 +52,9 @@ for @num -> $T {
is +@arr, 3, "Numifies to grown number of elems on $t array";
nok @arr.infinite, "$t array with values is not infinite";

is (@arr[^3] = NaN,-Inf,Inf), (NaN,-Inf,Inf),
"are special IEEE values supported on $t array";

is_approx (@arr[10] = 10.0e0), 10.0e0,
"Can assign non-contiguously to $t array";
is_approx @arr[ 9], 0e0, "Elems non-contiguous assign 0 on $t array";
Expand Down

0 comments on commit 591288e

Please sign in to comment.