-
-
Save timo/6147b62c22b4ac7a6673 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Test; | |
my $a = 10 div 0; ok $a.WHAT === Failure, "10 div 0"; | |
my $b = 10 / 0; ok $b.WHAT === Rat, "10 / 0 is a Rat."; | |
my $c = 10 / 0.0; ok $c.WHAT === Rat, "10 / 0.0"; | |
my $d = 10 / 0e0; ok $d.WHAT === Failure, "10 / 0e0"; | |
my $e = (1/1) / 0e0; ok $e.WHAT === Failure, "(1/1) / 0e0"; | |
my $f = 1e0 / (0/1); ok $f.WHAT === Failure, "1e0 / (0/1)"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment