From ab4bbc6a5e645963b0726f479708de544afbc0c5 Mon Sep 17 00:00:00 2001 From: Zoffix Znet Date: Wed, 19 Oct 2016 14:11:38 +0000 Subject: [PATCH] =?UTF-8?q?Test=20=E2=89=85=20works=20correctly=20with=20i?= =?UTF-8?q?nfinities?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- S03-operators/relational.t | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/S03-operators/relational.t b/S03-operators/relational.t index b7de69749d..2389576e8f 100644 --- a/S03-operators/relational.t +++ b/S03-operators/relational.t @@ -1,7 +1,7 @@ use v6; use Test; -plan 171; +plan 179; ## N.B.: Tests for infix:«<=>» (spaceship) and infix: belong ## in F. @@ -208,6 +208,15 @@ is sqrt((-1).Complex) ≅ 0+1i, True, "can use approximate on Complex with negli is sqrt((-1).Complex) ≅ 0+2i, False, "can use approximate on Complex with non-negligible real"; is sqrt((-1).Complex) ≅ 0+(1+1e-17)i, True, "can use approximate on Complex"; +is-deeply ∞ ≅ ∞, Bool::True, ' ∞ ≅ ∞ gives True'; +is-deeply -∞ ≅ -∞, Bool::True, '-∞ ≅ -∞ gives True'; +is-deeply ∞ =~= ∞, Bool::True, ' ∞ =~= ∞ gives True'; +is-deeply -∞ =~= -∞, Bool::True, '-∞ =~= -∞ gives True'; +is-deeply ∞ ≅ -∞, Bool::False, ' ∞ ≅ -∞ gives False'; +is-deeply -∞ ≅ ∞, Bool::False, '-∞ ≅ ∞ gives False'; +is-deeply ∞ =~= -∞, Bool::False, ' ∞ =~= -∞ gives False'; +is-deeply -∞ =~= ∞, Bool::False, '-∞ =~= ∞ gives False'; + { my $*TOLERANCE = 0.1; ok 1.01 =~= 1, '=~= pays attention to $*TOLERANCE (More)';