Skip to content

Commit

Permalink
Stop some tests in S02 assuming that a floating point literal like 1.…
Browse files Browse the repository at this point in the history
…2 is of type Rat.

git-svn-id: http://svn.pugscode.org/pugs@27674 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
toyam committed Jul 22, 2009
1 parent 5e54dcb commit 6e0e9d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
3 changes: 1 addition & 2 deletions S02-builtin_data_types/num.t
Expand Up @@ -103,8 +103,7 @@ isa_ok(1 div 1, Rat);

{
my $a = 1.0000000000000000000000000000000000000000000000000000000000000000000e1;
#?rakudo skip "no Rat yet"
isa_ok($a, Rat);
isa_ok($a, Num);
ok($a == 10.0, 'trailing zeros compare correctly');
}

Expand Down
4 changes: 2 additions & 2 deletions S02-builtin_data_types/type.t
Expand Up @@ -118,8 +118,8 @@ my $baz of Int;
{
# the following two are the same type of behavior
# S02: "It is possible for the of type to disagree with the as type"
my Rat sub returntype4 ($pass) as Num {$pass ?? 1.1 !! 1}
my sub returntype5 ($pass --> Rat) as Num {$pass ?? 2.2 !! 2}
my Rat sub returntype4 ($pass) as Num {$pass ?? 11 div 10 !! 1}
my sub returntype5 ($pass --> Rat) as Num {$pass ?? 11 div 5 !! 2}

is(returntype4(True), 1.1, 'good return value works (my Type sub as OtherType)');
eval_dies_ok('returntype4(False)', 'bad return value dies (my Type sub as OtherType)');
Expand Down
5 changes: 0 additions & 5 deletions TODO
Expand Up @@ -45,11 +45,6 @@ the spec (newest first)
S02
* tests for Implementation types (the Perl 6 equiv. of tie()), probably need
more specs as well
* some tests in S02 assume that a floating point literal like 1.2 is of typ
Rat (rational), but it really is of type Num. Same for things like (1 / 2)
(to produce a Rat you need (1 div 2) or (1/2) without spaces).
This needs cleanup. Just grep for Rat,
review the tests and clean them up where appropriate

S03
* tests for cmp() and eqv() methods of objects
Expand Down

0 comments on commit 6e0e9d5

Please sign in to comment.