From 8b4382d2f2f80e3da8b87201a7444641c616f2f1 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Fri, 15 Oct 2021 20:35:01 -0400 Subject: [PATCH] Transform compareArray -> assert.compareArray: test/language/**/*.js (#3239) --- .../computed-property-names/basics/number.js | 6 +++--- .../computed-property-names/basics/string.js | 6 +++--- .../computed-property-names/basics/symbol.js | 12 ++++++------ .../class/method/generator.js | 6 +++--- .../class/method/number.js | 6 +++--- .../class/method/string.js | 6 +++--- .../class/method/symbol.js | 12 ++++++------ .../object/method/generator.js | 6 +++--- .../object/method/number.js | 6 +++--- .../object/method/string.js | 6 +++--- .../object/method/symbol.js | 12 ++++++------ .../to-name-side-effects/numbers-object.js | 6 +++--- .../to-name-side-effects/object.js | 6 +++--- .../language/rest-parameters/arrow-function.js | 14 +++++++------- .../rest-parameters/no-alias-arguments.js | 2 +- .../rest-parameters/with-new-target.js | 16 ++++++++-------- .../fn-length-static-precedence-order.js | 10 +++++----- .../fn-name-static-precedence-order.js | 10 +++++----- .../class/static-init-arguments-functions.js | 12 ++++++------ .../class/static-init-arguments-methods.js | 18 +++++++++--------- ...ontructor-calls-super-multiple-arguments.js | 2 +- .../Array/regular-subclassing.js | 2 +- 22 files changed, 91 insertions(+), 91 deletions(-) diff --git a/test/language/computed-property-names/basics/number.js b/test/language/computed-property-names/basics/number.js index 823d669f8b..ebb7927e7e 100644 --- a/test/language/computed-property-names/basics/number.js +++ b/test/language/computed-property-names/basics/number.js @@ -21,7 +21,7 @@ assert.sameValue(object.a, 'A', "The value of `object.a` is `'A'`. Defined in `o assert.sameValue(object[1], 'B', "The value of `object[1]` is `'B'`. Defined in `object` as `[1]: 'B'`"); assert.sameValue(object.c, 'C', "The value of `object.c` is `'C'`. Defined in `object` as `c: 'C'`"); assert.sameValue(object[2], 'D', "The value of `object[2]` is `'D'`. Defined in `object` as `[ID(2)]: 'D'`"); -assert( - compareArray(Object.getOwnPropertyNames(object), ['1', '2', 'a', 'c']), - "`compareArray(Object.getOwnPropertyNames(object), ['1', '2', 'a', 'c'])` returns `true`" +assert.compareArray( + Object.getOwnPropertyNames(object), + ['1', '2', 'a', 'c'] ); diff --git a/test/language/computed-property-names/basics/string.js b/test/language/computed-property-names/basics/string.js index 039b4d4697..8a5bdb65c9 100644 --- a/test/language/computed-property-names/basics/string.js +++ b/test/language/computed-property-names/basics/string.js @@ -20,7 +20,7 @@ assert.sameValue(object.a, 'A', "The value of `object.a` is `'A'`. Defined in `o assert.sameValue(object.b, 'B', "The value of `object.b` is `'B'`. Defined in `object` as `['b']: 'B'`"); assert.sameValue(object.c, 'C', "The value of `object.c` is `'C'`. Defined in `object` as `c: 'C'`"); assert.sameValue(object.d, 'D', "The value of `object.d` is `'D'`. Defined in `object` as `[ID('d')]: 'D'`"); -assert( - compareArray(Object.getOwnPropertyNames(object), ['a', 'b', 'c', 'd']), - "`compareArray(Object.getOwnPropertyNames(object), ['a', 'b', 'c', 'd'])` returns `true`" +assert.compareArray( + Object.getOwnPropertyNames(object), + ['a', 'b', 'c', 'd'] ); diff --git a/test/language/computed-property-names/basics/symbol.js b/test/language/computed-property-names/basics/symbol.js index 9408401002..760ec6a0f0 100644 --- a/test/language/computed-property-names/basics/symbol.js +++ b/test/language/computed-property-names/basics/symbol.js @@ -24,11 +24,11 @@ assert.sameValue(object.a, 'A', "The value of `object.a` is `'A'`. Defined in `o assert.sameValue(object[sym1], 'B', "The value of `object[sym1]` is `'B'`. Defined in `object` as `[sym1]: 'B'`"); assert.sameValue(object.c, 'C', "The value of `object.c` is `'C'`. Defined in `object` as `c: 'C'`"); assert.sameValue(object[sym2], 'D', "The value of `object[sym2]` is `'D'`. Defined in `object` as `[ID(sym2)]: 'D'`"); -assert( - compareArray(Object.getOwnPropertyNames(object), ['a', 'c']), - "`compareArray(Object.getOwnPropertyNames(object), ['a', 'c'])` returns `true`" +assert.compareArray( + Object.getOwnPropertyNames(object), + ['a', 'c'] ); -assert( - compareArray(Object.getOwnPropertySymbols(object), [sym1, sym2]), - "`compareArray(Object.getOwnPropertySymbols(object), [sym1, sym2])` returns `true`" +assert.compareArray( + Object.getOwnPropertySymbols(object), + [sym1, sym2] ); diff --git a/test/language/computed-property-names/class/method/generator.js b/test/language/computed-property-names/class/method/generator.js index 94d9054cd4..eb76c26e1d 100644 --- a/test/language/computed-property-names/class/method/generator.js +++ b/test/language/computed-property-names/class/method/generator.js @@ -17,7 +17,7 @@ assert.sameValue( 0, "The value of `Object.keys(C.prototype).length` is `0`" ); -assert( - compareArray(Object.getOwnPropertyNames(C.prototype), ['constructor', 'a']), - "`compareArray(Object.getOwnPropertyNames(C.prototype), ['constructor', 'a'])` returns `true`" +assert.compareArray( + Object.getOwnPropertyNames(C.prototype), + ['constructor', 'a'] ); diff --git a/test/language/computed-property-names/class/method/number.js b/test/language/computed-property-names/class/method/number.js index b8b005995b..c1d4d744c3 100644 --- a/test/language/computed-property-names/class/method/number.js +++ b/test/language/computed-property-names/class/method/number.js @@ -24,7 +24,7 @@ assert.sameValue(new C()[2](), 'D', "`new C()[2]()` returns `'D'`, from `[ID(2)] assert.sameValue(Object.keys(C.prototype).length, 0, "No enum keys from C.prototype"); -assert( - compareArray(Object.getOwnPropertyNames(C.prototype), ['1', '2', 'constructor', 'a', 'c']), - "`compareArray(Object.getOwnPropertyNames(C.prototype), ['1', '2', 'constructor', 'a', 'c'])` returns `true`" +assert.compareArray( + Object.getOwnPropertyNames(C.prototype), + ['1', '2', 'constructor', 'a', 'c'] ); diff --git a/test/language/computed-property-names/class/method/string.js b/test/language/computed-property-names/class/method/string.js index f35f2341d1..a03914b89e 100644 --- a/test/language/computed-property-names/class/method/string.js +++ b/test/language/computed-property-names/class/method/string.js @@ -22,7 +22,7 @@ assert.sameValue(new C().b(), 'B', "`new C().b()` returns `'B'`. Defined as `['b assert.sameValue(new C().c(), 'C', "`new C().c()` returns `'C'`. Defined as `c() { return 'C'; }`"); assert.sameValue(new C().d(), 'D', "`new C().d()` returns `'D'`. Defined as `[ID('d')]() { return 'D'; }`"); assert.sameValue(Object.keys(C.prototype).length, 0, "No enum keys from C.prototype"); -assert( - compareArray(Object.getOwnPropertyNames(C.prototype), ['constructor', 'a', 'b', 'c', 'd']), - "`compareArray(Object.getOwnPropertyNames(C.prototype), ['constructor', 'a', 'b', 'c', 'd'])` returns `true`" +assert.compareArray( + Object.getOwnPropertyNames(C.prototype), + ['constructor', 'a', 'b', 'c', 'd'] ); diff --git a/test/language/computed-property-names/class/method/symbol.js b/test/language/computed-property-names/class/method/symbol.js index 9dd9870b11..15ba397fcb 100644 --- a/test/language/computed-property-names/class/method/symbol.js +++ b/test/language/computed-property-names/class/method/symbol.js @@ -25,11 +25,11 @@ assert.sameValue(new C()[sym1](), 'B', "`new C()[sym1]()` returns `'B'`. Defined assert.sameValue(new C().c(), 'C', "`new C().c()` returns `'C'`. Defined as `c() { return 'C'; }`"); assert.sameValue(new C()[sym2](), 'D', "`new C()[sym2]()` returns `'D'`. Defined as `[ID(sym2)]() { return 'D'; }`"); assert.sameValue(Object.keys(C.prototype).length, 0, "No enum keys from C.prototype"); -assert( - compareArray(Object.getOwnPropertyNames(C.prototype), ['constructor', 'a', 'c']), - "`compareArray(Object.getOwnPropertyNames(C.prototype), ['constructor', 'a', 'c'])` returns `true`" +assert.compareArray( + Object.getOwnPropertyNames(C.prototype), + ['constructor', 'a', 'c'] ); -assert( - compareArray(Object.getOwnPropertySymbols(C.prototype), [sym1, sym2]), - "`compareArray(Object.getOwnPropertySymbols(C.prototype), [sym1, sym2])` returns `true`" +assert.compareArray( + Object.getOwnPropertySymbols(C.prototype), + [sym1, sym2] ); diff --git a/test/language/computed-property-names/object/method/generator.js b/test/language/computed-property-names/object/method/generator.js index dcf29a544a..1e9d082fa0 100644 --- a/test/language/computed-property-names/object/method/generator.js +++ b/test/language/computed-property-names/object/method/generator.js @@ -12,7 +12,7 @@ var object = { yield 2; } }; -assert( - compareArray(Object.keys(object), ['a']), - "`compareArray(Object.keys(object), ['a'])` returns `true`" +assert.compareArray( + Object.keys(object), + ['a'] ); diff --git a/test/language/computed-property-names/object/method/number.js b/test/language/computed-property-names/object/method/number.js index 65196664c7..002c5b29d3 100644 --- a/test/language/computed-property-names/object/method/number.js +++ b/test/language/computed-property-names/object/method/number.js @@ -21,7 +21,7 @@ assert.sameValue(object.a(), 'A', "`object.a()` returns `'A'`. Defined as `a() { assert.sameValue(object[1](), 'B', "`object[1]()` returns `'B'`. Defined as `[1]() { return 'B'; }`"); assert.sameValue(object.c(), 'C', "`object.c()` returns `'C'`. Defined as `c() { return 'C'; }`"); assert.sameValue(object[2](), 'D', "`object[2]()` returns `'D'`. Defined as `[ID(2)]() { return 'D'; }`"); -assert( - compareArray(Object.getOwnPropertyNames(object), ['1', '2', 'a', 'c']), - "`compareArray(Object.getOwnPropertyNames(object), ['1', '2', 'a', 'c'])` returns `true`" +assert.compareArray( + Object.getOwnPropertyNames(object), + ['1', '2', 'a', 'c'] ); diff --git a/test/language/computed-property-names/object/method/string.js b/test/language/computed-property-names/object/method/string.js index bbf18e67fb..f050d490af 100644 --- a/test/language/computed-property-names/object/method/string.js +++ b/test/language/computed-property-names/object/method/string.js @@ -21,7 +21,7 @@ assert.sameValue(object.a(), 'A', "`object.a()` returns `'A'`. Defined as `a() { assert.sameValue(object.b(), 'B', "`object.b()` returns `'B'`. Defined as `['b']() { return 'B'; }`"); assert.sameValue(object.c(), 'C', "`object.c()` returns `'C'`. Defined as `c() { return 'C'; }`"); assert.sameValue(object.d(), 'D', "`object.d()` returns `'D'`. Defined as `[ID('d')]() { return 'D'; }`"); -assert( - compareArray(Object.getOwnPropertyNames(object), ['a', 'b', 'c', 'd']), - "`compareArray(Object.getOwnPropertyNames(object), ['a', 'b', 'c', 'd'])` returns `true`" +assert.compareArray( + Object.getOwnPropertyNames(object), + ['a', 'b', 'c', 'd'] ); diff --git a/test/language/computed-property-names/object/method/symbol.js b/test/language/computed-property-names/object/method/symbol.js index 5bd07c468e..a17e231aa6 100644 --- a/test/language/computed-property-names/object/method/symbol.js +++ b/test/language/computed-property-names/object/method/symbol.js @@ -24,11 +24,11 @@ assert.sameValue(object.a(), 'A', "`object.a()` returns `'A'`. Defined as `a() { assert.sameValue(object[sym1](), 'B', "`object[sym1]()` returns `'B'`. Defined as `[sym1]() { return 'B'; }`"); assert.sameValue(object.c(), 'C', "`object.c()` returns `'C'`. Defined as `c() { return 'C'; }`"); assert.sameValue(object[sym2](), 'D', "`object[sym2]()` returns `'D'`. Defined as `[ID(sym2)]() { return 'D'; }`"); -assert( - compareArray(Object.getOwnPropertyNames(object), ['a', 'c']), - "`compareArray(Object.getOwnPropertyNames(object), ['a', 'c'])` returns `true`" +assert.compareArray( + Object.getOwnPropertyNames(object), + ['a', 'c'] ); -assert( - compareArray(Object.getOwnPropertySymbols(object), [sym1, sym2]), - "`compareArray(Object.getOwnPropertySymbols(object), [sym1, sym2])` returns `true`" +assert.compareArray( + Object.getOwnPropertySymbols(object), + [sym1, sym2] ); diff --git a/test/language/computed-property-names/to-name-side-effects/numbers-object.js b/test/language/computed-property-names/to-name-side-effects/numbers-object.js index edf3855c75..aa0e2ad4cb 100644 --- a/test/language/computed-property-names/to-name-side-effects/numbers-object.js +++ b/test/language/computed-property-names/to-name-side-effects/numbers-object.js @@ -33,7 +33,7 @@ assert.sameValue(object.a, 'A', "The value of `object.a` is `'A'`. Defined as `a assert.sameValue(object[1], 'B', "The value of `object[1]` is `'B'`. Defined as `[key1]: 'B'`"); assert.sameValue(object.c, 'C', "The value of `object.c` is `'C'`. Defined as `c: 'C'`"); assert.sameValue(object[2], 'D', "The value of `object[2]` is `'D'`. Defined as `[key2]: 'D'`"); -assert( - compareArray(Object.getOwnPropertyNames(object), ['1', '2', 'a', 'c']), - "`compareArray(Object.getOwnPropertyNames(object), ['1', '2', 'a', 'c'])` returns `true`" +assert.compareArray( + Object.getOwnPropertyNames(object), + ['1', '2', 'a', 'c'] ); diff --git a/test/language/computed-property-names/to-name-side-effects/object.js b/test/language/computed-property-names/to-name-side-effects/object.js index a0a3e64a11..9f895a0950 100644 --- a/test/language/computed-property-names/to-name-side-effects/object.js +++ b/test/language/computed-property-names/to-name-side-effects/object.js @@ -30,7 +30,7 @@ assert.sameValue(object.a(), 'A', "`object.a()` returns `'A'`. Defined as `a() { assert.sameValue(object.b(), 'B', "`object.b()` returns `'B'`. Defined as `[key1]() { return 'B'; }`"); assert.sameValue(object.c(), 'C', "`object.c()` returns `'C'`. Defined as `c() { return 'C'; }`"); assert.sameValue(object.d(), 'D', "`object.d()` returns `'D'`. Defined as `[key2]() { return 'D'; }`"); -assert( - compareArray(Object.getOwnPropertyNames(object), ['a', 'b', 'c', 'd']), - "`compareArray(Object.getOwnPropertyNames(object), ['a', 'b', 'c', 'd'])` returns `true`" +assert.compareArray( + Object.getOwnPropertyNames(object), + ['a', 'b', 'c', 'd'] ); diff --git a/test/language/rest-parameters/arrow-function.js b/test/language/rest-parameters/arrow-function.js index b7c922e33e..62abb38032 100644 --- a/test/language/rest-parameters/arrow-function.js +++ b/test/language/rest-parameters/arrow-function.js @@ -8,10 +8,10 @@ includes: [compareArray.js] ---*/ var fn = (a, b, ...c) => c; -assert(compareArray(fn(), []), "`compareArray(fn(), [])` returns `true`"); -assert(compareArray(fn(1, 2), []), "`compareArray(fn(1, 2), [])` returns `true`"); -assert(compareArray(fn(1, 2, 3), [3]),"`compareArray(fn(1, 2, 3), [3])` returns `true`"); -assert(compareArray(fn(1, 2, 3, 4), [3, 4]),"`compareArray(fn(1, 2, 3, 4), [3, 4])` returns `true`"); -assert(compareArray(fn(1, 2, 3, 4, 5), [3, 4, 5]),"`compareArray(fn(1, 2, 3, 4, 5), [3, 4, 5])` returns `true`"); -assert(compareArray(((...args) => args)(), []),"`compareArray(((...args) => args)(), [])` returns `true`"); -assert(compareArray(((...args) => args)(1,2,3), [1,2,3]),"`compareArray(((...args) => args)(1,2,3), [1,2,3])` returns `true`"); +assert.compareArray(fn(), []); +assert.compareArray(fn(1, 2), []); +assert.compareArray(fn(1, 2, 3), [3]); +assert.compareArray(fn(1, 2, 3, 4), [3, 4]); +assert.compareArray(fn(1, 2, 3, 4, 5), [3, 4, 5]); +assert.compareArray(((...args) => args)(), []); +assert.compareArray(((...args) => args)(1,2,3), [1,2,3]); diff --git a/test/language/rest-parameters/no-alias-arguments.js b/test/language/rest-parameters/no-alias-arguments.js index e35165f0ad..564126a017 100644 --- a/test/language/rest-parameters/no-alias-arguments.js +++ b/test/language/rest-parameters/no-alias-arguments.js @@ -10,6 +10,6 @@ function f(a, ...rest) { arguments[0] = 1; assert.sameValue(a, 3, "The value of `a` is `3`"); arguments[1] = 2; - assert(compareArray(rest, [4, 5]), "`compareArray(rest, [4, 5])` returns `true`"); + assert.compareArray(rest, [4, 5]); } f(3, 4, 5); diff --git a/test/language/rest-parameters/with-new-target.js b/test/language/rest-parameters/with-new-target.js index 209f904f06..f9cef15254 100644 --- a/test/language/rest-parameters/with-new-target.js +++ b/test/language/rest-parameters/with-new-target.js @@ -18,7 +18,7 @@ class Base { for (var i = 0; i < arguments.length; ++i) { args.push(arguments[i]); } - assert(compareArray(args, a), "`compareArray(args, a)` returns `true`"); + assert.compareArray(args, a); } } class Child extends Base { @@ -34,7 +34,7 @@ class Child extends Base { for (var i = 0; i < arguments.length; ++i) { args.push(arguments[i]); } - assert(compareArray(args, b), "`compareArray(args, b)` returns `true`"); + assert.compareArray(args, b); } } @@ -43,11 +43,11 @@ var c = new Child(1, 2, 3); assert.sameValue(c.child.length, 3, "The value of `c.child.length` is `3`"); assert.sameValue(c.base.length, 3, "The value of `c.base.length` is `3`"); -assert( - compareArray(c.child, [1, 2, 3]), - "`compareArray(c.child, [1, 2, 3])` returns `true`" +assert.compareArray( + c.child, + [1, 2, 3] ); -assert( - compareArray(c.base, [1, 2, 3]), - "`compareArray(c.base, [1, 2, 3])` returns `true`" +assert.compareArray( + c.base, + [1, 2, 3] ); diff --git a/test/language/statements/class/definition/fn-length-static-precedence-order.js b/test/language/statements/class/definition/fn-length-static-precedence-order.js index 6aa57673a2..795349ffe4 100644 --- a/test/language/statements/class/definition/fn-length-static-precedence-order.js +++ b/test/language/statements/class/definition/fn-length-static-precedence-order.js @@ -33,7 +33,7 @@ class A { } } -assert(compareArray(Object.getOwnPropertyNames(A), ['length', 'name', 'prototype', 'method'])) +assert.compareArray(Object.getOwnPropertyNames(A), ['length', 'name', 'prototype', 'method']) var attr = 'length'; class B { @@ -45,7 +45,7 @@ class B { } } -assert(compareArray(Object.getOwnPropertyNames(B), ['length', 'name', 'prototype'])) +assert.compareArray(Object.getOwnPropertyNames(B), ['length', 'name', 'prototype']) class C { static get length() { @@ -53,7 +53,7 @@ class C { } } -assert(compareArray(Object.getOwnPropertyNames(C), ['length', 'name', 'prototype'])) +assert.compareArray(Object.getOwnPropertyNames(C), ['length', 'name', 'prototype']) class D { static set length(_) { @@ -61,7 +61,7 @@ class D { } } -assert(compareArray(Object.getOwnPropertyNames(D), ['length', 'name', 'prototype'])) +assert.compareArray(Object.getOwnPropertyNames(D), ['length', 'name', 'prototype']) class E { static *length() { @@ -69,4 +69,4 @@ class E { } } -assert(compareArray(Object.getOwnPropertyNames(E), ['length', 'name', 'prototype'])) +assert.compareArray(Object.getOwnPropertyNames(E), ['length', 'name', 'prototype']) diff --git a/test/language/statements/class/definition/fn-name-static-precedence-order.js b/test/language/statements/class/definition/fn-name-static-precedence-order.js index 4612767b6e..a440897f66 100644 --- a/test/language/statements/class/definition/fn-name-static-precedence-order.js +++ b/test/language/statements/class/definition/fn-name-static-precedence-order.js @@ -30,7 +30,7 @@ class A { } } -assert(compareArray(Object.getOwnPropertyNames(A), ['length', 'name', 'prototype', 'method'])) +assert.compareArray(Object.getOwnPropertyNames(A), ['length', 'name', 'prototype', 'method']) var attr = 'name'; class B { @@ -42,7 +42,7 @@ class B { } } -assert(compareArray(Object.getOwnPropertyNames(B), ['length', 'name', 'prototype'])) +assert.compareArray(Object.getOwnPropertyNames(B), ['length', 'name', 'prototype']) class C { static get name() { @@ -50,7 +50,7 @@ class C { } } -assert(compareArray(Object.getOwnPropertyNames(C), ['length', 'name', 'prototype'])) +assert.compareArray(Object.getOwnPropertyNames(C), ['length', 'name', 'prototype']) class D { static set name(_) { @@ -58,7 +58,7 @@ class D { } } -assert(compareArray(Object.getOwnPropertyNames(D), ['length', 'name', 'prototype'])) +assert.compareArray(Object.getOwnPropertyNames(D), ['length', 'name', 'prototype']) class E { static *name() { @@ -66,4 +66,4 @@ class E { } } -assert(compareArray(Object.getOwnPropertyNames(E), ['length', 'name', 'prototype'])) +assert.compareArray(Object.getOwnPropertyNames(E), ['length', 'name', 'prototype']) diff --git a/test/language/statements/class/static-init-arguments-functions.js b/test/language/statements/class/static-init-arguments-functions.js index 19aefb2234..152d6f535b 100644 --- a/test/language/statements/class/static-init-arguments-functions.js +++ b/test/language/statements/class/static-init-arguments-functions.js @@ -32,9 +32,9 @@ class C { } } -assert(compareArray(['function'], fn), 'body'); -assert(compareArray(['function'], fnParam), 'parameter'); -assert(compareArray(['generator function'], gen), 'body'); -assert(compareArray(['generator function'], genParam), 'parameter'); -assert(compareArray(['async function'], asyncFn), 'body'); -assert(compareArray(['async function'], asyncFnParam), 'parameter'); +assert.compareArray(['function'], fn, 'body'); +assert.compareArray(['function'], fnParam, 'parameter'); +assert.compareArray(['generator function'], gen, 'body'); +assert.compareArray(['generator function'], genParam, 'parameter'); +assert.compareArray(['async function'], asyncFn, 'body'); +assert.compareArray(['async function'], asyncFnParam, 'parameter'); diff --git a/test/language/statements/class/static-init-arguments-methods.js b/test/language/statements/class/static-init-arguments-methods.js index 66862156d9..1ef423dc39 100644 --- a/test/language/statements/class/static-init-arguments-methods.js +++ b/test/language/statements/class/static-init-arguments-methods.js @@ -47,12 +47,12 @@ instance.accessor = 'setter'; instance.gen('generator method').next(); instance.async('async method'); -assert(compareArray(['method'], method), 'body'); -assert(compareArray(['method'], methodParam), 'parameter'); -assert(compareArray([], getter), 'body'); -assert(compareArray(['setter'], setter), 'body'); -assert(compareArray(['setter'], setterParam), 'parameter'); -assert(compareArray(['generator method'], genMethod), 'body'); -assert(compareArray(['generator method'], genMethodParam), 'parameter'); -assert(compareArray(['async method'], asyncMethod), 'body'); -assert(compareArray(['async method'], asyncMethodParam), 'parameter'); +assert.compareArray(['method'], method, 'body'); +assert.compareArray(['method'], methodParam, 'parameter'); +assert.compareArray([], getter, 'body'); +assert.compareArray(['setter'], setter, 'body'); +assert.compareArray(['setter'], setterParam, 'parameter'); +assert.compareArray(['generator method'], genMethod, 'body'); +assert.compareArray(['generator method'], genMethodParam, 'parameter'); +assert.compareArray(['async method'], asyncMethod, 'body'); +assert.compareArray(['async method'], asyncMethodParam, 'parameter'); diff --git a/test/language/statements/class/subclass/builtin-objects/Array/contructor-calls-super-multiple-arguments.js b/test/language/statements/class/subclass/builtin-objects/Array/contructor-calls-super-multiple-arguments.js index fe92330aa2..ad7a57b2f4 100644 --- a/test/language/statements/class/subclass/builtin-objects/Array/contructor-calls-super-multiple-arguments.js +++ b/test/language/statements/class/subclass/builtin-objects/Array/contructor-calls-super-multiple-arguments.js @@ -23,4 +23,4 @@ class Sub extends Array { var sub = new Sub(42, 'foo'); -assert(compareArray(sub, [42, 'foo'])); +assert.compareArray(sub, [42, 'foo']); diff --git a/test/language/statements/class/subclass/builtin-objects/Array/regular-subclassing.js b/test/language/statements/class/subclass/builtin-objects/Array/regular-subclassing.js index ec0b752798..087efb14ce 100644 --- a/test/language/statements/class/subclass/builtin-objects/Array/regular-subclassing.js +++ b/test/language/statements/class/subclass/builtin-objects/Array/regular-subclassing.js @@ -29,5 +29,5 @@ var a2 = new Sub(7); assert.sameValue(a2.length, 7); var a3 = new Sub(); -assert(compareArray(a3, [])); +assert.compareArray(a3, []); assert.sameValue(a3.length, 0);