Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
nom fudge
  • Loading branch information
coke committed Aug 8, 2011
1 parent 8bdc636 commit f735ef3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions S06-operator-overloading/imported-subs.t
Expand Up @@ -12,22 +12,32 @@ BEGIN { @*INC.push: 't/spec/packages' };
# note that eval_dies_ok executes in the context of
# Test.pm, and Test.pm doesn't import or lift the operators

#?rakudo todo 'nom regression'
ok eval('5!'), 'postfix:<!> was exported...';
#?rakudo todo 'nom regression'
ok eval('5! == 120 or die'), '... and it works';
eval_dies_ok '5!', 'Test.pm does not import the operators';

#?rakudo todo 'nom regression'
ok eval('"a" yadayada "b"'), 'infix:<yadayada> was exported';
#?rakudo todo 'nom regression'
ok eval('"a" yadayada "b" eq "a..b" or die'), '... and it works';
#?rakudo todo "op= form doesn't work for imported operators?"
ok eval('my $a = "a"; $a yadayada= "b"; $a eq "a..b" or die'), '... and yadayada= works too';

#?rakudo todo 'nom regression'
ok eval('¢"foo"'), 'imported Unicode prefix operator';
#?rakudo todo 'nom regression'
ok eval('¢4 eq "4 cent" or die '), '... and it works';

#?rakudo todo 'nom regression'
ok eval('3 ± 4'), 'infix:<±> was exported';
#?rakudo todo 'nom regression'
ok eval('(3 ± 4).isa(Range) or die'), '... and it works';

#?rakudo todo 'nom regression'
is eval("(NotANumber.new(:number(4)) NAN+ NotANumber.new(:number(-1))).number"), 3, "infix:<NAN+> was exported";
#?rakudo todo 'nom regression'
is eval("(NotANumber.new(:number(4)) + NotANumber.new(:number(-1))).number"), 3, "multi infix:<+> was exported and is visible";

#?rakudo 2 todo "op= form doesn't work for imported operators?"
Expand Down

0 comments on commit f735ef3

Please sign in to comment.