Skip to content

Commit

Permalink
[t/spec] Add two tests to verify that Rats raised to positive Int pow…
Browse files Browse the repository at this point in the history
…ers are still Rats.
  • Loading branch information
colomon committed Sep 12, 2010
1 parent 1beb062 commit 508e297
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion S32-num/rat.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 799;
plan 801;

# Basic test functions specific to rational numbers.

Expand Down Expand Up @@ -230,6 +230,9 @@ is .88888888888.WHAT, 'Rat()', 'WHAT works on Rat created from 11 digit decimal
isa_ok $a, Rat, 'Any() + 0.1 is a Rat';
}

isa_ok (2/3) ** 3, Rat, "Rat raised to a positive Int power is a Rat";
is (2/3) ** 3, 8/27, "Rat raised to a positive Int power gets correct answer";

done_testing;

# vim: ft=perl6

0 comments on commit 508e297

Please sign in to comment.