Browse Source

Fixed tests compilation (#1516)

pull/1514/head
Iban Eguia 3 years ago committed by GitHub
parent
commit
ca9120de05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      boa/src/exec/tests.rs
  2. 22
      boa/src/syntax/parser/expression/primary/object_initializer/tests.rs

2
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\"",
)]);
}

22
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()),
)]

Loading…
Cancel
Save