Skip to content

Commit

Permalink
[v6.d REVIEW] Use is-eqv for Seq test in Set[Hash].roll
Browse files Browse the repository at this point in the history
Orig: c4c10d506
  • Loading branch information
zoffixznet committed Sep 16, 2018
1 parent e21d102 commit 445c3c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions S02-types/set.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use v6;
use lib $?FILE.IO.parent(2).add: 'packages';
use Test;
use Test::Util;

plan 227;

Expand Down Expand Up @@ -262,7 +264,7 @@ dies-ok { set(1, 2) «+» set(3, 4) }, 'Set «+» Set is illegal';
-1, '-1',
-Inf, '-Inf'
-> $p, $t {
is-deeply set().roll($p), ().Seq, "empty set.roll($t) -> ().Seq"
is-eqv set().roll($p), ().Seq, "empty set.roll($t) -> ().Seq"
}
dies-ok { set().roll(NaN) }, 'empty set.roll(NaN) should die';
}
Expand Down Expand Up @@ -304,7 +306,7 @@ dies-ok { set(1, 2) «+» set(3, 4) }, 'Set «+» Set is illegal';
-1, '-1',
-Inf, '-Inf'
-> $p, $t {
is-deeply set().pick($p), ().Seq, "empty set.pick($t) -> ().Seq"
is-eqv set().pick($p), ().Seq, "empty set.pick($t) -> ().Seq"
}
dies-ok { set().pick(NaN) }, 'empty set.pick(NaN) should die';
}
Expand Down
6 changes: 4 additions & 2 deletions S02-types/sethash.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use v6;
use lib $?FILE.IO.parent(2).add: 'packages';
use Test::Util;
use Test;

plan 257;
Expand Down Expand Up @@ -263,7 +265,7 @@ sub showset($s) { $s.keys.sort.join(' ') }
-1, '-1',
-Inf, '-Inf'
-> $p, $t {
is-deeply ().SetHash.roll($p), ().Seq, "().SetHash.roll($t) -> ().Seq"
is-eqv ().SetHash.roll($p), ().Seq, "().SetHash.roll($t) -> ().Seq"
}
dies-ok { ().SetHash.roll(NaN) }, '().SetHash.roll(NaN) should die';
}
Expand Down Expand Up @@ -307,7 +309,7 @@ sub showset($s) { $s.keys.sort.join(' ') }
-1, '-1',
-Inf, '-Inf'
-> $p, $t {
is-deeply ().SetHash.pick($p), ().Seq, "().SetHash.pick($t) -> ().Seq"
is-eqv ().SetHash.pick($p), ().Seq, "().SetHash.pick($t) -> ().Seq"
}
dies-ok { ().SetHash.pick(NaN) }, '().SetHash.pick(NaN) should die';
}
Expand Down

0 comments on commit 445c3c5

Please sign in to comment.