From 3007411eb54991617587daf6ec2a3fa2db95a469 Mon Sep 17 00:00:00 2001 From: NathanRoyer Date: Sun, 23 May 2021 10:12:27 +0200 Subject: [PATCH] Revert "fix: adopting changes of RFC 2700 (tests)" This reverts commit 7ed87c1b651ba5a3ab80a07fc77307cada3df428. --- boa/src/exec/tests.rs | 2 +- boa/src/value/tests.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/boa/src/exec/tests.rs b/boa/src/exec/tests.rs index e86deaca9c8..7ee43f05c9b 100644 --- a/boa/src/exec/tests.rs +++ b/boa/src/exec/tests.rs @@ -992,7 +992,7 @@ fn to_int32() { ($from:expr => $to:expr) => { assert_eq!(Value::from($from).to_i32(&mut context).unwrap(), $to); }; - } + }; check_to_int32!(f64::NAN => 0); check_to_int32!(f64::NEG_INFINITY => 0); diff --git a/boa/src/value/tests.rs b/boa/src/value/tests.rs index c87e39e9c91..81619ffd474 100644 --- a/boa/src/value/tests.rs +++ b/boa/src/value/tests.rs @@ -58,7 +58,7 @@ fn number_is_true() { assert_eq!(Value::from(0.0).to_boolean(), false); assert_eq!(Value::from(-0.0).to_boolean(), false); assert_eq!(Value::from(-1.0).to_boolean(), true); - assert_eq!(Value::from(f64::NAN).to_boolean(), false); + assert_eq!(Value::from(NAN).to_boolean(), false); } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness @@ -569,7 +569,7 @@ fn to_integer_or_infinity() { Ok(IntegerOrInfinity::Integer(0)) ); assert_eq!( - Value::from(f64::NAN).to_integer_or_infinity(&mut context), + Value::from(NAN).to_integer_or_infinity(&mut context), Ok(IntegerOrInfinity::Integer(0)) ); assert_eq!(