Skip to content

Commit

Permalink
Couple more (passing!) tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
colomon committed Mar 13, 2012
1 parent aff6975 commit f6739f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion t/00-experiments.t
@@ -1,6 +1,6 @@
use Test;

plan 7;
plan 9;

sub make-continued-fraction (Real $x is copy) {
gather loop {
Expand Down Expand Up @@ -45,3 +45,6 @@ sub z($a is copy, $b is copy, $c is copy, $d is copy, @x) {
is z(1, 2, 2, 0, [1, 5, 2]), [1, 1, 2, 7], "mjd's example works";
is z(1, 0, 1, 0, [1, 2, 3, 4]), [1], "z handles case where it is 0 times x";
is z(1, 0, 1, 0, [0]), [1], "z handles another case where it is 0 times x";
is z(1, 4, 4, 0, make-continued-fraction(22/7)), make-continued-fraction(22/7+1/4),
"+1/4 works, with make-continued-fraction";
is z(1, 0, 0, 1, make-continued-fraction(22/7)), make-continued-fraction(7/22), "z works to get reciprocal";

0 comments on commit f6739f7

Please sign in to comment.