Skip to content

Commit

Permalink
Revert "fix: adopting changes of RFC 2700 (tests)"
Browse files Browse the repository at this point in the history
This reverts commit 7ed87c1.
  • Loading branch information
NathanRoyer committed May 23, 2021
1 parent 0dd0c58 commit 3007411
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion boa/src/exec/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions boa/src/value/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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!(
Expand Down

0 comments on commit 3007411

Please sign in to comment.