From 13879b16a4bf27e3b693d6353b2f66835d16b503 Mon Sep 17 00:00:00 2001 From: Paul Lancaster Date: Wed, 19 Aug 2020 23:50:58 +0100 Subject: [PATCH 1/2] Test + fmt fix --- boa/src/exec/tests.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/boa/src/exec/tests.rs b/boa/src/exec/tests.rs index 662c9c00e8b..2a570ace257 100644 --- a/boa/src/exec/tests.rs +++ b/boa/src/exec/tests.rs @@ -769,10 +769,9 @@ mod in_operator { let bar_val = forward_val(&mut engine, "bar").unwrap(); let bar_obj = bar_val.as_object().unwrap(); let foo_val = forward_val(&mut engine, "Foo").unwrap(); - let foo_obj = foo_val.as_object().unwrap(); assert!(bar_obj .prototype() - .strict_equals(&foo_obj.get_field("prototype").unwrap())); + .strict_equals(&foo_val.get_field("prototype"))); } } @@ -967,7 +966,7 @@ fn to_length() { assert_eq!( Value::number(100000000000.0) .to_length(&mut engine) - .unwrap(), + .unwrap() as u128, 100000000000 ); assert_eq!( From bd94caa62cdb1c82a4911a1bfeaa620f1bfadb4f Mon Sep 17 00:00:00 2001 From: Paul Lancaster Date: Thu, 20 Aug 2020 08:40:19 +0100 Subject: [PATCH 2/2] Use u64 instead of u128 in test --- boa/src/exec/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boa/src/exec/tests.rs b/boa/src/exec/tests.rs index 2a570ace257..7130cab8124 100644 --- a/boa/src/exec/tests.rs +++ b/boa/src/exec/tests.rs @@ -966,7 +966,7 @@ fn to_length() { assert_eq!( Value::number(100000000000.0) .to_length(&mut engine) - .unwrap() as u128, + .unwrap() as u64, 100000000000 ); assert_eq!(