Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
s/is_deeply/is-deeply/g
  • Loading branch information
lizmat committed May 19, 2015
1 parent db4b007 commit a87fde4
Show file tree
Hide file tree
Showing 94 changed files with 695 additions and 695 deletions.
4 changes: 2 additions & 2 deletions S01-perl-5-integration/roundtrip.t
Expand Up @@ -34,12 +34,12 @@ my %hash = (foo => 'bar', hate => 'software');
{
my $foo = $tohash_p5.(keys %hash);
cmp_ok($foo, &infix:<cmp>, %hash);
is_deeply([$foo.keys].sort, [%hash.keys].sort);
is-deeply([$foo.keys].sort, [%hash.keys].sort);
}

#?niecza skip 'VAR undeclared'
{
is_deeply([%hash.keys].sort, [$keys_p5($%hash)].sort);
is-deeply([%hash.keys].sort, [$keys_p5($%hash)].sort);
}

# vim: ft=perl6
60 changes: 30 additions & 30 deletions S02-literals/adverbs.t
Expand Up @@ -6,21 +6,21 @@ plan 32;
# L<S02/Adverbial Pair forms>

{
is_deeply (:a), (a => True), "Basic boolean adverb works";
is_deeply (:!a), (a => False), "Negated boolean adverb works";
is_deeply (:a(0)), (a => 0), "Adverb with value in parens works";
is_deeply (:a<foo>), (a => 'foo'), "Adverb with angle quote value works";
is_deeply (:a<foo bar>), (a => <foo bar>), "...and does the right thing with the value list";
is_deeply (:a[16,42]), (a => [16,42]), "Adverb with postfix:<[ ]> works";
is-deeply (:a), (a => True), "Basic boolean adverb works";
is-deeply (:!a), (a => False), "Negated boolean adverb works";
is-deeply (:a(0)), (a => 0), "Adverb with value in parens works";
is-deeply (:a<foo>), (a => 'foo'), "Adverb with angle quote value works";
is-deeply (:a<foo bar>), (a => <foo bar>), "...and does the right thing with the value list";
is-deeply (:a[16,42]), (a => [16,42]), "Adverb with postfix:<[ ]> works";
my $a = "abcd";
my @a = <efg hij>;
my %a = klm => "nop";
my &a = ->{ "qrst" };
is_deeply (:$a), (a => $a), ":$a works";
is_deeply (:@a), (a => @a), ":@a works";
is_deeply (:%a), (a => %a), ":%a works";
is_deeply (:&a), (a => &a), ":&a works";
is_deeply (:42nd), (nd => 42), "Basic numeric adverb works";
is-deeply (:$a), (a => $a), ":$a works";
is-deeply (:@a), (a => @a), ":@a works";
is-deeply (:%a), (a => %a), ":%a works";
is-deeply (:&a), (a => &a), ":&a works";
is-deeply (:42nd), (nd => 42), "Basic numeric adverb works";
throws_like { EVAL ':69th($_)' },
X::Comp::AdHoc,
"Numeric adverb can't have an extra value";
Expand All @@ -29,34 +29,34 @@ plan 32;

=twigils

is_deeply (:$=pod), (pod => $=pod), 'Adverb with $= twigil works';
is-deeply (:$=pod), (pod => $=pod), 'Adverb with $= twigil works';
# save for when @=COMMENT works
# is_deeply (:@=COMMENT), (COMMENT => @=COMMENT), 'Adverb with @= twigil works';
# is-deeply (:@=COMMENT), (COMMENT => @=COMMENT), 'Adverb with @= twigil works';
# There is no %= special variable yet
is_deeply (:$?PACKAGE), (PACKAGE => $?PACKAGE), 'Adverb with $? twigil works';
is-deeply (:$?PACKAGE), (PACKAGE => $?PACKAGE), 'Adverb with $? twigil works';
# There is no @? special variable yet
# save for when %?LANG works
# is_deeply (:%?LANG), (LANG => %?LANG), 'Adverb with %? twigil works';
is_deeply (:$*CWD), (CWD => $*CWD), 'Adverb with $* twigil works';
is_deeply (:@*ARGS), (ARGS => @*ARGS), 'Adverb with @* twigil works';
is_deeply (:%*ENV), (ENV => %*ENV), 'Adverb with %* twigil works';
is_deeply ({ :$^f }(3)), (f => 3), 'Adverb with $^ twigil works';
is_deeply ({ :@^f }([3,3])), (f => [3,3]), 'Adverb with @^ twigil works';
is_deeply ({ :%^f }((:a(3)))), (f => :a(3)), 'Adverb with %^ twigil works';
is_deeply ({ :$:f }(:f(3))), (f => 3), 'Adverb with $: twigil works';
is_deeply ({ :@:f }(:f(3,3))), (f => (3,3)), 'Adverb with @: twigil works';
is_deeply ({ :%:f }(:f(:a<3>))), (f => :a<3>), 'Adverb with %: twigil works';
# is-deeply (:%?LANG), (LANG => %?LANG), 'Adverb with %? twigil works';
is-deeply (:$*CWD), (CWD => $*CWD), 'Adverb with $* twigil works';
is-deeply (:@*ARGS), (ARGS => @*ARGS), 'Adverb with @* twigil works';
is-deeply (:%*ENV), (ENV => %*ENV), 'Adverb with %* twigil works';
is-deeply ({ :$^f }(3)), (f => 3), 'Adverb with $^ twigil works';
is-deeply ({ :@^f }([3,3])), (f => [3,3]), 'Adverb with @^ twigil works';
is-deeply ({ :%^f }((:a(3)))), (f => :a(3)), 'Adverb with %^ twigil works';
is-deeply ({ :$:f }(:f(3))), (f => 3), 'Adverb with $: twigil works';
is-deeply ({ :@:f }(:f(3,3))), (f => (3,3)), 'Adverb with @: twigil works';
is-deeply ({ :%:f }(:f(:a<3>))), (f => :a<3>), 'Adverb with %: twigil works';
# Not using sigils in rx due to RT #121061 but we do not need to for this
"aaaa" ~~ m/$<fee>=a $<fie>=((a)(a)) $<foe>=($<fum>=(a))/;
is_deeply (:$<fee>), (fee => $<fee>), 'Adverb with $< twigil works';
is-deeply (:$<fee>), (fee => $<fee>), 'Adverb with $< twigil works';
#?rakudo 2 todo ":@<...> and :%<...> broken needs RT"
is_deeply (:@<fie>), (fie => @<fie>), 'Adverb with @< twigil works';
is_deeply (:%<foe>), (foe => %<foe>), 'Adverb with %< twigil works';
is-deeply (:@<fie>), (fie => @<fie>), 'Adverb with @< twigil works';
is-deeply (:%<foe>), (foe => %<foe>), 'Adverb with %< twigil works';
#?rakudo.moar 3 todo "Moar makes new slang object each time, other backend NYI?"
#?rakudo.jvm 3 skip "Type check failed; expected 'Any' but got 'Mu'"
is_deeply (:$~MAIN), (MAIN => $~MAIN), 'Adverb with $~ twigil works';
is_deeply (:@~MAIN), (MAIN => @~MAIN), 'Adverb with @~ twigil works';
is_deeply (:%~MAIN), (MAIN => %~MAIN), 'Adverb with %~ twigil works';
is-deeply (:$~MAIN), (MAIN => $~MAIN), 'Adverb with $~ twigil works';
is-deeply (:@~MAIN), (MAIN => @~MAIN), 'Adverb with @~ twigil works';
is-deeply (:%~MAIN), (MAIN => %~MAIN), 'Adverb with %~ twigil works';

} # 30

Expand Down
2 changes: 1 addition & 1 deletion S02-magicals/args.t
Expand Up @@ -4,7 +4,7 @@ use Test;
plan 6;

isa-ok @*ARGS, Array, '@*ARGS is an Array';
is_deeply @*ARGS, [], 'by default @*ARGS is empty array';
is-deeply @*ARGS, [], 'by default @*ARGS is empty array';

lives_ok { @*ARGS = 1, 2 }, '@*ARGS is writable';

Expand Down
2 changes: 1 addition & 1 deletion S02-names-vars/list_array_perl.t
Expand Up @@ -93,7 +93,7 @@ my @tests = (
# RT #65988
{
my $rt65988 = (\(1,2), \(3,4));
is_deeply EVAL( $rt65988.perl ), $rt65988, $rt65988.perl ~ '.perl';
is-deeply EVAL( $rt65988.perl ), $rt65988, $rt65988.perl ~ '.perl';
}

# probably there is a better place for this test
Expand Down
2 changes: 1 addition & 1 deletion S02-names-vars/names.t
Expand Up @@ -58,7 +58,7 @@ plan 144;
}

# RT #77750
is_deeply ::.^methods, PseudoStash.^methods, ':: is a valid PseudoStash';
is-deeply ::.^methods, PseudoStash.^methods, ':: is a valid PseudoStash';

# RT #63646
{
Expand Down
8 changes: 4 additions & 4 deletions S02-names/is_cached.t
Expand Up @@ -73,16 +73,16 @@ plan 38;
multi foo (Str $string) { @str.push: $string; $string }

is foo(42), 42, 'did we get the value back (1)';
is_deeply @int, [42], 'was the code done (1)';
is-deeply @int, [42], 'was the code done (1)';
is foo(42), 42, 'did we get the value back (2)';
#?rakudo.jvm todo "is cached is only a hint: RT #122425"
is_deeply @int, [42], 'was the code done (2)';
is-deeply @int, [42], 'was the code done (2)';

is foo("Camelia"), "Camelia", 'did we get the value back (3)';
is_deeply @str, [<Camelia>], 'was the code done (3)';
is-deeply @str, [<Camelia>], 'was the code done (3)';
is foo("Camelia"), "Camelia", 'did we get the value back (4)';
#?rakudo.jvm todo "is cached is only a hint: RT #122425"
is_deeply @str, [<Camelia>], 'was the code done (4)';
is-deeply @str, [<Camelia>], 'was the code done (4)';
} #4

# vim: ft=perl6
8 changes: 4 additions & 4 deletions S02-types/flattening.t
Expand Up @@ -97,10 +97,10 @@ plan 41;
my @a-h = @$h;
my @h-h = %$h;

is_deeply +@a-a, 3, '@ sigil flattening of itemized array';
is_deeply +@h-a, 3, '% sigil flattening of itemized array';
is_deeply +@a-h, 3, '@ sigil flattening of itemized hash';
is_deeply +@h-h, 3, '% sigil flattening of itemized hash';
is-deeply +@a-a, 3, '@ sigil flattening of itemized array';
is-deeply +@h-a, 3, '% sigil flattening of itemized array';
is-deeply +@a-h, 3, '@ sigil flattening of itemized hash';
is-deeply +@h-h, 3, '% sigil flattening of itemized hash';
}

# vim: ft=perl6
2 changes: 1 addition & 1 deletion S02-types/hash.t
Expand Up @@ -227,7 +227,7 @@ lives_ok { Hash.new("a" => "b") }, 'Hash.new($pair) lives';
is %h.elems, 0, 'reading multi-level non-existing hash keys does not create it';
%h<foo><bar> = "baz";
is %h.elems, 1, 'multi-level auto-vivify number of elements';
is_deeply %h<foo>, (bar => "baz").hash, "multi-level auto-vivify";
is-deeply %h<foo>, (bar => "baz").hash, "multi-level auto-vivify";
} #4

#RT #76644
Expand Down
4 changes: 2 additions & 2 deletions S02-types/lazy-lists.t
Expand Up @@ -139,10 +139,10 @@ sub make-lazy-list($num) { gather { take $_ for 0..^$num; $was-lazy = 0 } };
my @a;
@a.push: $("one,two,three".split(","));
#?rakudo.jvm todo 'RT #121994'
is_deeply @a, [(<one two three>).list.item], "push: did we not lose the split?";
is-deeply @a, [(<one two three>).list.item], "push: did we not lose the split?";
my @b;
@b.unshift: $("one,two,three".split(","));
is_deeply @b, [(<one two three>).list.item], "unshift: did we not lose the split?";
is-deeply @b, [(<one two three>).list.item], "unshift: did we not lose the split?";
}

# RT #120035
Expand Down
16 changes: 8 additions & 8 deletions S03-metaops/hyper.t
Expand Up @@ -320,7 +320,7 @@ my @e;
@r = -«([1, 2], [3, [4, 5]]);
my @e = ([-1, -2], [-3, [-4, -5]]);
is(~@r, ~@e, "distribution for unary prefix");
is_deeply(@r, @e, "distribution for unary prefix, deep comparison");
is-deeply(@r, @e, "distribution for unary prefix, deep comparison");
};

{ # distribution for unary postfix autoincrement
Expand All @@ -329,7 +329,7 @@ my @e;
@r»++;
my @e = [2, 3], [4, [5, 6]];
is(~@r, ~@e, "distribution for unary postfix autoincr");
is_deeply(@r, @e, "distribution for unary postfix autoincr, deep comparison");
is-deeply(@r, @e, "distribution for unary postfix autoincr, deep comparison");

is @e»[1], '3 5 6', "nodal postcircumfixes do not distribute";
is @e».elems, '2 2', "nodal methods do not distribute (elems)";
Expand All @@ -343,17 +343,17 @@ my @e;
@r = (1, 2, [3, 4]) >>+<< (4, 5, [6, 7]);
my @e = (5, 7, [9, 11]);
is(~@r, ~@e, "distribution for binary infix, same shape, ASCII");
is_deeply(@r, @e, "distribution for binary infix, same shape, ASCII, deep comparison");
is-deeply(@r, @e, "distribution for binary infix, same shape, ASCII, deep comparison");

@r = (1, 2, [3, 4]) >>+>> (5, 6, 7);
@e = (6, 8, [10, 11]);
is(~@r, ~@e, "distribution for binary infix, dimension upgrade, ASCII");
is_deeply(@r, @e, "distribution for binary infix, dimension upgrade, ASCII, deep comparison");
is-deeply(@r, @e, "distribution for binary infix, dimension upgrade, ASCII, deep comparison");

@r = ([1, 2], 3) <<+>> (4, [5, 6]);
@e = ([5, 6], [8, 9]);
is(~@r, ~@e, "distribution for binary infix, S03 cross-upgrade, ASCII");
is_deeply(@r, @e, "distribution for binary infix, S03 cross-upgrade, ASCII, deep comparison");
is-deeply(@r, @e, "distribution for binary infix, S03 cross-upgrade, ASCII, deep comparison");
};

#?DOES 3
Expand All @@ -362,17 +362,17 @@ my @e;
@r = (1, 2, [3, 4]) »+« (4, 5, [6, 7]);
my @e = (5, 7, [9, 11]);
is(~@r, ~@e, "distribution for binary infix, same shape");
is_deeply(@r, @e, "distribution for binary infix, same shape, deep comparison");
is-deeply(@r, @e, "distribution for binary infix, same shape, deep comparison");

@r = (1, 2, [3, 4]) »+» (5, 6, 7);
@e = (6, 8, [10, 11]);
is(~@r, ~@e, "distribution for binary infix, dimension upgrade");
is_deeply(@r, @e, "distribution for binary infix, dimension upgrade, deep comparison");
is-deeply(@r, @e, "distribution for binary infix, dimension upgrade, deep comparison");

@r = ([1, 2], 3) «+» (4, [5, 6]);
@e = ([5, 6], [8, 9]);
is(~@r, ~@e, "distribution for binary infix, S03 cross-upgrade");
is_deeply(@r, @e, "distribution for binary infix, S03 cross-upgrade, deep comparison");
is-deeply(@r, @e, "distribution for binary infix, S03 cross-upgrade, deep comparison");
};

{ # regression test, ensure that hyper works on arrays
Expand Down
2 changes: 1 addition & 1 deletion S03-operators/buf.t
Expand Up @@ -35,7 +35,7 @@ is $b cmp $a, Order::More, 'cmp (larger)';

ok $a ~ $b eq Buf.new(1, 2, 3, 1, 2, 3, 4), '~ and eq work on bufs';

is_deeply Buf.new(1, 2, 3) ~ Buf.new(4, 5), Buf.new(1, 2, 3, 4, 5), '~ concatenates';
is-deeply Buf.new(1, 2, 3) ~ Buf.new(4, 5), Buf.new(1, 2, 3, 4, 5), '~ concatenates';
nok Buf.new(), 'empty Buf is false';
ok Buf.new(1), 'non-empty Buf is true';

Expand Down
8 changes: 4 additions & 4 deletions S03-operators/context.t
Expand Up @@ -57,10 +57,10 @@ plan 38;
my @a = 1, 2;
my %b = 'x' => 42;

is_deeply [@a], [1, 2], '@array flattening';
is_deeply [item @a], [[1, 2]], 'item @array non-flattening';
is_deeply [%b], ['x' => 42], '%hash flattening';
is_deeply [item %b], [{'x' => 42}], 'item %hash non-flattening';
is-deeply [@a], [1, 2], '@array flattening';
is-deeply [item @a], [[1, 2]], 'item @array non-flattening';
is-deeply [%b], ['x' => 42], '%hash flattening';
is-deeply [item %b], [{'x' => 42}], 'item %hash non-flattening';
}

{
Expand Down
4 changes: 2 additions & 2 deletions S03-operators/flip-flop.t
Expand Up @@ -130,11 +130,11 @@ plan 40;
return [$lhs_run, $rhs_run];
}

is_deeply ff_eval({@_[0]() ff @_[1]()}, /B/, /B/, <A B A B A>),
is-deeply ff_eval({@_[0]() ff @_[1]()}, /B/, /B/, <A B A B A>),
[5, 2], "count lhs & rhs evals for ff";


is_deeply ff_eval({@_[0]() fff @_[1]()}, /B/, /B/, <A B A B A>),
is-deeply ff_eval({@_[0]() fff @_[1]()}, /B/, /B/, <A B A B A>),
[3, 2], "count lhs & rhs evals for fff";
}

Expand Down

0 comments on commit a87fde4

Please sign in to comment.