Skip to content

Commit

Permalink
Make unimatch test fail for the right reason
Browse files Browse the repository at this point in the history
unimatch should always be called with at least 2 parameters as a sub,
or one parameter as a method.
  • Loading branch information
lizmat committed Apr 7, 2021
1 parent f250322 commit 2b556e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions S15-unicode-information/unimatch-general.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ plan 224;

is unimatch("",'Nd'), Nil, "unimatch an empty string yields Nil";
is "".unimatch('Nd'), Nil, "''.unimatch yields Nil";
throws-like "unimatch Str", X::Multi::NoMatch, 'cannot call unimatch with a Str';
throws-like "Str.unimatch", X::Multi::NoMatch, 'cannot call unimatch with a Str';
throws-like "unimatch Int", X::TypeCheck::Argument, 'cannot call unimatch with a Int';
throws-like "Int.unimatch", X::Multi::NoMatch, 'cannot call unimatch with a Int';
throws-like "unimatch Str, 'Latin'", X::Multi::NoMatch, 'cannot call unimatch with a Str';
throws-like "Str.unimatch: 'Latin'", X::Multi::NoMatch, 'cannot call unimatch with a Str';
throws-like "unimatch Int, 'Latin'", X::Multi::NoMatch, 'cannot call unimatch with a Int';
throws-like "Int.unimatch: 'Latin'", X::Multi::NoMatch, 'cannot call unimatch with a Int';

nok unimatch(0x29, 'Nd'), "0x29 is not Nd";
ok unimatch(0x30, 'Nd'), "0x30 is Nd";
Expand Down

0 comments on commit 2b556e0

Please sign in to comment.