Skip to content

Commit

Permalink
Modify tests for Set.Str and KeySet.Str to conform to TimToady's sugg…
Browse files Browse the repository at this point in the history
  • Loading branch information
colomon committed Mar 27, 2012
1 parent 609b319 commit 014f5f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 3 additions & 5 deletions S02-types/keyset.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 112;
plan 110;

# L<S02/Mutable types/"KeyHash of Bool">

Expand Down Expand Up @@ -164,12 +164,10 @@ sub showset($s) { $s.keys.sort.join(' ') }
}

{
my $s = KeySet.new(<foo bar baz>);
my $s = set <foo bar baz>;
lives_ok { $s = $s.Str }, ".Str lives";
isa_ok $s, Str, "... and produces a string";
ok $s ~~ /foo/, "... which mentions foo";
ok $s ~~ /bar/, "... which mentions bar";
ok $s ~~ /baz/, "... which mentions baz";
is $s.split(" ").sort.join(" "), "bar baz foo", "... which only contains bar baz and foo separated by spaces";
}

{
Expand Down
6 changes: 2 additions & 4 deletions S02-types/set.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 93;
plan 91;

sub showset($s) { $s.keys.sort.join(' ') }

Expand Down Expand Up @@ -136,9 +136,7 @@ sub showset($s) { $s.keys.sort.join(' ') }
my $s = set <foo bar baz>;
lives_ok { $s = $s.Str }, ".Str lives";
isa_ok $s, Str, "... and produces a string";
ok $s ~~ /foo/, "... which mentions foo";
ok $s ~~ /bar/, "... which mentions bar";
ok $s ~~ /baz/, "... which mentions baz";
is $s.split(" ").sort.join(" "), "bar baz foo", "... which only contains bar baz and foo separated by spaces";
}

{
Expand Down

0 comments on commit 014f5f8

Please sign in to comment.