From 326ee0a072ef21ccbd5f696667c87e2d125f29bf Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 13 Sep 2010 01:41:08 -0700 Subject: [PATCH] [S32-num] Add some tests for Rat representation of Inf --- S32-num/rat.t | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/S32-num/rat.t b/S32-num/rat.t index add23b4ddb..82517c820d 100644 --- a/S32-num/rat.t +++ b/S32-num/rat.t @@ -2,7 +2,7 @@ use v6; use Test; -plan 802; +plan 804; # Basic test functions specific to rational numbers. @@ -132,11 +132,12 @@ is_approx sin(5.0e0), sin(10/2), 'sin(Rat) works'; # wisdom of allowing math with zero denominator Rats, # so I'm holding off on writing tests for it. -# SHOULD: Add NaN / Inf tests - #?rakudo todo "NaN.Rat == NaN" is NaN.Rat, NaN, "NaN.Rat == NaN"; +is Inf.Rat, Inf, "Inf.Rat == Inf"; +is (-Inf).Rat, -Inf, "(-Inf).Rat == -Inf"; + # RT #74648 isa_ok Inf.Int / 1, Rat, "Inf.Int / 1 is a Rat";