Skip to content

Commit

Permalink
[v6.d REVIEW] Document what unreduced .norm is about
Browse files Browse the repository at this point in the history
Since now we spec Rationals must always be reduced, it doesn't
make sense to have something "unreduced"
Orig: 7d0daf528
  • Loading branch information
zoffixznet committed Sep 9, 2018
1 parent 5c16428 commit f981650
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions S32-num/fatrat.t
Expand Up @@ -309,6 +309,8 @@ is-deeply (FatRat.new(1, 2) + <3/2>).ceiling, 2, '.ceiling with FatRat sums';

# https://github.com/rakudo/rakudo/commit/aac9efcbda
subtest '.norm returns reduced FatRat' => {
# This is test (of a now-deprecated method) was added back when
# some Rationals were allowed to be in unreduced form
plan 2;
given (FatRat.new(2,3) + 1/3).norm {
is-deeply .denominator, 1, 'denominator got reduced';
Expand Down
2 changes: 2 additions & 0 deletions S32-num/rat.t
Expand Up @@ -436,6 +436,8 @@ is-deeply (<1/2> + <3/2>).ceiling, 2, '.ceiling with Rat sums';

# https://github.com/rakudo/rakudo/commit/aac9efcbda
subtest '.norm returns reduced Rat' => {
# This is test (of a now-deprecated method) was added back when
# some Rationals were allowed to be in unreduced form
plan 2;
given (2/3 + 1/3).norm {
is-deeply .denominator, 1, 'denominator got reduced';
Expand Down

0 comments on commit f981650

Please sign in to comment.