Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Mu ~~ 0 and such should return False
  • Loading branch information
TimToady committed Sep 23, 2015
1 parent 30f08b1 commit f3a52d4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions S03-smartmatch/any-num.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 18;
plan 19;

#L<S03/Smart matching/Any Num numeric equality>
{
Expand All @@ -14,12 +14,10 @@ plan 18;
ok ('1.2' ~~ 1.2), '$thing ~~ Rat does numeric comparison';
ok ('1.2' ~~ 1.2.Num), '$thing ~~ Num does numeric comparison';

# yes, this warns, but it should still be true
#?rakudo 2 skip "Mu ~~ Num doesn't work yet: RT #122395"
#?niecza skip 'Nominal type check failed for #1'
ok (Mu ~~ 0), 'Mu ~~ 0';
#?niecza skip 'Nominal type check failed for #1'
ok !(Mu ~~ 2.3), 'Mu ~~ $other_number';
#?niecza 3 skip 'Nominal type check failed for #1'
ok !(Mu ~~ 0), 'Mu ~~ 0';
ok !(Mu ~~ 'foo'), 'Mu ~~ 0';
ok !(Mu ~~ 2.3), 'Mu ~~ $other_number';

ok (3+0i ~~ 3), 'Complex ~~ Int (+)';
nok (3+1i ~~ 3), 'Complex ~~ Int (-)';
Expand Down

0 comments on commit f3a52d4

Please sign in to comment.