From ca9120de05d5de75fbbcbff38d5741df447fa04d Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Wed, 25 Aug 2021 18:44:48 +0200 Subject: [PATCH] Fixed tests compilation (#1516) --- boa/src/exec/tests.rs | 2 +- .../primary/object_initializer/tests.rs | 22 ++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/boa/src/exec/tests.rs b/boa/src/exec/tests.rs index c650cf533b..62f2b3240e 100644 --- a/boa/src/exec/tests.rs +++ b/boa/src/exec/tests.rs @@ -758,7 +758,7 @@ mod in_operator { "#; check_output(&[TestAction::TestEq( - &scenario, + scenario, "Uncaught \"TypeError\": \"a is not a constructor\"", )]); } diff --git a/boa/src/syntax/parser/expression/primary/object_initializer/tests.rs b/boa/src/syntax/parser/expression/primary/object_initializer/tests.rs index fdb7d6f28d..eeae4ea58a 100644 --- a/boa/src/syntax/parser/expression/primary/object_initializer/tests.rs +++ b/boa/src/syntax/parser/expression/primary/object_initializer/tests.rs @@ -214,11 +214,15 @@ fn check_object_shorthand_property_names() { ", vec![ DeclarationList::Const( - vec![Declaration::new("a", Some(Const::from(true).into()))].into(), + vec![Declaration::new_with_identifier( + "a", + Some(Const::from(true).into()), + )] + .into(), ) .into(), DeclarationList::Const( - vec![Declaration::new( + vec![Declaration::new_with_identifier( "x", Some(Object::from(object_properties).into()), )] @@ -243,15 +247,23 @@ fn check_object_shorthand_multiple_properties() { ", vec![ DeclarationList::Const( - vec![Declaration::new("a", Some(Const::from(true).into()))].into(), + vec![Declaration::new_with_identifier( + "a", + Some(Const::from(true).into()), + )] + .into(), ) .into(), DeclarationList::Const( - vec![Declaration::new("b", Some(Const::from(false).into()))].into(), + vec![Declaration::new_with_identifier( + "b", + Some(Const::from(false).into()), + )] + .into(), ) .into(), DeclarationList::Const( - vec![Declaration::new( + vec![Declaration::new_with_identifier( "x", Some(Object::from(object_properties).into()), )]